From 0f3a64c481520f01b51ae81db8421a2a2587e9d6 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Thu, 4 Dec 2025 09:11:58 +0100 Subject: [PATCH 1/2] refactor: remove some obsolete TODO comments --- build.zig | 2 -- src/keybind/keybind.zig | 4 ---- 2 files changed, 6 deletions(-) diff --git a/build.zig b/build.zig index 60af927..dbe08cb 100644 --- a/build.zig +++ b/build.zig @@ -459,7 +459,6 @@ pub fn build_exe( .{ .name = "cbor", .module = cbor_mod }, .{ .name = "thespian", .module = thespian_mod }, .{ .name = "input", .module = input_mod }, - // TODO: we should be able to work without these modules .{ .name = "vaxis", .module = vaxis_mod }, .{ .name = "color", .module = color_mod }, .{ .name = "gui_config", .module = gui_config_mod }, @@ -478,7 +477,6 @@ pub fn build_exe( .{ .name = "thespian", .module = thespian_mod }, .{ .name = "input", .module = input_mod }, .{ .name = "gui", .module = gui_mod }, - // TODO: we should be able to work without these modules .{ .name = "tuirenderer", .module = tui_renderer_mod }, .{ .name = "vaxis", .module = vaxis_mod }, }, diff --git a/src/keybind/keybind.zig b/src/keybind/keybind.zig index 2be4170..f38b6f4 100644 --- a/src/keybind/keybind.zig +++ b/src/keybind/keybind.zig @@ -1,7 +1,3 @@ -//TODO figure out how keybindings should be configured - -//TODO figure out how to handle bindings that can take a numerical prefix - const std = @import("std"); const tp = @import("thespian"); const cbor = @import("cbor"); From 76f23b0824d36fa526e9dc8a540a81c78637fcdc Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Thu, 4 Dec 2025 09:12:19 +0100 Subject: [PATCH 2/2] fix: indent line rendering when scrolled right --- src/tui/editor.zig | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/tui/editor.zig b/src/tui/editor.zig index 5e34ca3..85d7d77 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -1483,6 +1483,7 @@ pub const Editor = struct { } fn render_whitespace_map(self: *Self, theme: *const Widget.Theme, cell_map: CellMap) !void { + const col_offset = self.view.col; const char = whitespace.char; const frame = tracy.initZone(@src(), .{ .name = "editor whitespace map" }); defer frame.deinit(); @@ -1525,12 +1526,13 @@ pub const Editor = struct { _ = self.plane.at_cursor_cell(&cell) catch return; switch (self.render_whitespace) { .indent => { - if (leading and x % self.indent_size == 0) + const col = x + col_offset; + const is_indent_col = col % self.indent_size == 0; + if (leading and is_indent_col) cell.cell.char.grapheme = char.indent; - if (is_blank and x < prev_indent and x % self.indent_size == 0) + if (is_blank and col < prev_indent and is_indent_col) cell.cell.char.grapheme = char.indent; }, - .leading => { if (leading) { if (get_whitespace_char(cell_type, next_cell_type)) |c|