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.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/body_layer.zig b/core/body_layer.zig
index 78b8e0b9..817176bb 100644
--- a/core/body_layer.zig
+++ b/core/body_layer.zig
@@ -88,6 +88,7 @@ fn paintSourceSelection(p: *Pardes, s: *Surface, pane: *Pane, r: Rect, rows: []c
var visible: i32 = 0;
while (visible < @as(i32, r.h -| pane.tag_rows)) : (visible += 1) {
const source = pane.wrapAt(p.settings.tab, visible);
+ if (source.ghost) continue;
const line = edit.pointerSourceLine(pane, terminal_lines, source.line);
const start = @min(line.len, @as(usize, @intCast(@max(0, source.at))));
const next = pane.wrapAt(p.settings.tab, visible + 1);
@@ -280,7 +281,7 @@ fn drawWrapMarkers(
const marker_fg = p.chromeTheme().lineno;
var row: u16 = 0;
while (row + 1 < pane.wrap_n and row + 1 < body_h) : (row += 1) {
- if (pane.wrap_line[row + 1] != pane.wrap_line[row]) continue;
+ if (pane.wrap_line[row + 1] != pane.wrap_line[row] or pane.wrap_col[row] < 0) continue;
s.set(tx + tw - 1, body_y + row, config.wrap_marker, .{
.fg = .{ .rgb = marker_fg },
.bg = pane_bg,
@@ -406,7 +407,7 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
var vr: i32 = 0;
while (vr + @as(i32, pane.tag_rows) < @as(i32, body_bottom)) : (vr += 1) {
const w = pane.wrapAt(p.settings.tab, vr);
- if (w.line < bnd.lo_row or w.line > bnd.hi_row) continue;
+ if (w.line < bnd.lo_row or w.line > bnd.hi_row or w.ghost) continue;
const visible_line = modal.lineSlice(body, @intCast(vr));
// Only the visible columns are measured: a selection that
// starts before this row's first column starts at it, and