diff options
Diffstat (limited to 'core/body_layer.zig')
| -rw-r--r-- | core/body_layer.zig | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/body_layer.zig b/core/body_layer.zig index 28b86f78..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, @@ -338,7 +339,9 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane // File layout is independent of whether its producer requests colors. if (pane.file) |*f| { drawGutter(p, s, pane, r, tx, tw, body_h, active); - if (pane.layers.lanes > 0) @import("jj.zig").paint(p, s, pane, r, tx, tw, body_h); + // Never inlined: in renderBody's own frame it cost every body a + // frame (a terminal's output about 33,000 instructions a pump). + if (pane.layers.lanes > 0) @call(.never_inline, @import("jj.zig").paint, .{ p, s, pane, r, tx, tw, body_h }); panes.Query.paintMark(p, s, pane, r, body_h); if (pane.colorAlgo() != .none) panes.File.recolorSyntax(p, s, pane, f, r, tx, tw, body_h); @@ -404,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 |
