refactor: add diffz support and use it for gutter diffs

This commit is contained in:
CJ van den Berg 2026-01-13 16:14:57 +01:00
parent 1e02d978de
commit cf28e27a81
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
7 changed files with 464 additions and 268 deletions

View file

@ -35,7 +35,7 @@ symbols: bool,
width: usize = 4,
editor: *ed.Editor,
editor_widget: ?*const Widget = null,
diff_: diff.AsyncDiffer,
diff_: diff.diffz.AsyncDiffer,
diff_symbols: std.ArrayList(Symbol),
const Self = @This();
@ -55,7 +55,7 @@ pub fn create(allocator: Allocator, parent: Widget, event_source: Widget, editor
.highlight = tui.config().highlight_current_line_gutter,
.symbols = tui.config().gutter_symbols,
.editor = editor,
.diff_ = try diff.create(),
.diff_ = try diff.diffz.create(),
.diff_symbols = .empty,
};
try tui.message_filters().add(MessageFilter.bind(self, filter_receive));