on master help sign in
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).

commit2284bce970e9175fd81851e1616218a6119354fc authorAlexis Mousset <alexis.mousset@rudder.io> dateThu 21 Sep 2023, 00:28 (3 years ago) parent651fd1c
2 files changed+6−3
book/src/themes.md+3 helix-view/src/gutter.rs+3−3
book/src/themes.md+3
@@ -245,9 +245,12 @@ We use a similar set of scopes as
245245
246246- `diff` - version control changes
247247 - `plus` - additions
248+ - `gutter` - gutter indicator
248249 - `minus` - deletions
250+ - `gutter` - gutter indicator
249251 - `delta` - modifications
250252 - `moved` - renamed or moved files/changes
253+ - `gutter` - gutter indicator
251254
252255#### Interface
253256
helix-view/src/gutter.rs+3−3
@@ -94,9 +94,9 @@ pub fn diff<'doc>(
9494 theme: &Theme,
9595 _is_focused: bool,
9696) -> GutterFn<'doc> {
97− let added = theme.get("diff.plus");
98− let deleted = theme.get("diff.minus");
99− let modified = theme.get("diff.delta");
97+ let added = theme.get("diff.plus.gutter");
98+ let deleted = theme.get("diff.minus.gutter");
99+ let modified = theme.get("diff.delta.gutter");
100100 if let Some(diff_handle) = doc.diff_handle() {
101101 let hunks = diff_handle.load();
102102 let mut hunk_i = 0;