summaryrefslogtreecommitdiff
path: root/src/File.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/File.zig')
-rw-r--r--src/File.zig60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/File.zig b/src/File.zig
index d5438704..fc50051c 100644
--- a/src/File.zig
+++ b/src/File.zig
@@ -1763,43 +1763,6 @@ fn fillBody(dst: ?[]u8, pane: *Pane, f: *State, width: usize, record_wrap: bool)
return written;
}
-pub fn drawGutter(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, tx: u16, tw: u16, body_h: u16, active: bool) void {
- const prefix_width = gutterWidth(pane);
- const goff = pane.scroll();
- const gcur = terminal.gridCursor(pane);
- const gcrow = if (pane.body.cur_pinned) pane.body.cur_row else @as(i32, gcur.y) + goff;
- const typing_body = pane.focus == .body and (pane.prompt == .none or pane.prompt == .del_side or pane.prompt == .repl_choice);
- const cur_line: i32 = if (active and typing_body) gcrow else std.math.minInt(i32);
- // the body's first row, the way renderPane derives it
- const body_y = p.bodyTop(pane, r);
- const context_bg = p.theme().tag_bg;
- for (0..@min(pane.context_rows, body_h)) |context_row| {
- for (0..tw) |col| {
- const cell = s.at(tx + @as(u16, @intCast(col)), body_y + @as(u16, @intCast(context_row)));
- cell.default = false;
- cell.style.bg = .{ .rgb = context_bg };
- cell.style.font_role = .tagline;
- }
- }
- var vr: u16 = 0;
- while (vr < body_h) : (vr += 1) {
- 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;
- var c: u16 = 0;
- while (c < prefix_width and c < tw) : (c += 1) {
- const cell = s.at(tx + c, body_y + vr);
- cell.default = false; // paints blank gutter rows too
- cell.style.fg = .{ .rgb = if (on_cursor)
- p.theme().lineno_active orelse p.theme().lineno
- else
- p.theme().lineno };
- cell.style.bold = on_cursor;
- }
- }
-}
-
const SynStyle = struct { fg: [3]u8, bold: bool };
/// How added and removed diff lines are told apart in every theme: a row
@@ -2191,29 +2154,6 @@ pub fn recolorDiffOutput(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, t
}
}
-pub fn drawWrapMarkers(
- p: *Pardes,
- s: *Surface,
- pane: *const Pane,
- r: pardes.Rect,
- tx: u16,
- tw: u16,
- body_h: u16,
- pane_bg: pardes.Color,
-) void {
- if (tw <= gutterWidth(pane) + 1) return;
- const body_y = p.bodyTop(pane, r);
- 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;
- s.set(tx + tw - 1, body_y + row, config.wrap_marker, .{
- .fg = .{ .rgb = marker_fg },
- .bg = pane_bg,
- });
- }
-}
-
pub fn paintWordSelection(
p: *Pardes,
s: *Surface,