summaryrefslogtreecommitdiff
path: root/core/body_layer.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/body_layer.zig')
-rw-r--r--core/body_layer.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/body_layer.zig b/core/body_layer.zig
index 101bbe9c..30d5a622 100644
--- a/core/body_layer.zig
+++ b/core/body_layer.zig
@@ -250,7 +250,8 @@ fn drawGutter(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, tx: u16, tw:
const row_line: i32 = if (pane.wrap_n == 0)
goff + @as(i32, vr)
else if (vr < pane.wrap_n) pane.wrap_line[vr] else std.math.maxInt(i32);
- const on_cursor = row_line == cur_line;
+ // The `~` of the slot past the text is no line's number: never lit.
+ const on_cursor = row_line == cur_line and row_line >= 0 and !panes.File.endSlot(pane, @intCast(row_line));
var c: u16 = 0;
while (c < prefix_width and c < tw) : (c += 1) {
const cell = s.at(tx + c, body_y + vr);