mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 09:26:19 +04:00
Allow specifying a different style for diff indicator in vcs gutter. (#8343)
This allows using a background in diff style (for nice patch file coloring) while keeping the gutter indicator nice (and using appropriate colors).
This commit is contained in:
parent
651fd1ca72
commit
2284bce970
@ -245,9 +245,12 @@ #### Syntax highlighting
|
|||||||
|
|
||||||
- `diff` - version control changes
|
- `diff` - version control changes
|
||||||
- `plus` - additions
|
- `plus` - additions
|
||||||
|
- `gutter` - gutter indicator
|
||||||
- `minus` - deletions
|
- `minus` - deletions
|
||||||
|
- `gutter` - gutter indicator
|
||||||
- `delta` - modifications
|
- `delta` - modifications
|
||||||
- `moved` - renamed or moved files/changes
|
- `moved` - renamed or moved files/changes
|
||||||
|
- `gutter` - gutter indicator
|
||||||
|
|
||||||
#### Interface
|
#### Interface
|
||||||
|
|
||||||
|
@ -94,9 +94,9 @@ pub fn diff<'doc>(
|
|||||||
theme: &Theme,
|
theme: &Theme,
|
||||||
_is_focused: bool,
|
_is_focused: bool,
|
||||||
) -> GutterFn<'doc> {
|
) -> GutterFn<'doc> {
|
||||||
let added = theme.get("diff.plus");
|
let added = theme.get("diff.plus.gutter");
|
||||||
let deleted = theme.get("diff.minus");
|
let deleted = theme.get("diff.minus.gutter");
|
||||||
let modified = theme.get("diff.delta");
|
let modified = theme.get("diff.delta.gutter");
|
||||||
if let Some(diff_handle) = doc.diff_handle() {
|
if let Some(diff_handle) = doc.diff_handle() {
|
||||||
let hunks = diff_handle.load();
|
let hunks = diff_handle.load();
|
||||||
let mut hunk_i = 0;
|
let mut hunk_i = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user