diff options
| -rw-r--r-- | build.zig | 8 | ||||
| -rw-r--r-- | docs/render-pipeline.md | 2 | ||||
| -rw-r--r-- | docs/typ/cheatsheet.typ | 2 | ||||
| -rw-r--r-- | docs/typ/themes.typ | 2 | ||||
| -rw-r--r-- | src/CHANGELOG.md | 13 | ||||
| -rw-r--r-- | src/body_layer.zig | 2 | ||||
| -rw-r--r-- | src/draw.zig | 95 | ||||
| -rw-r--r-- | src/grammar_manifest.zig | 108 | ||||
| -rw-r--r-- | src/gui/gui.zig | 14 | ||||
| -rw-r--r-- | src/layout.zig | 14 | ||||
| -rw-r--r-- | src/mouse.zig | 261 | ||||
| -rw-r--r-- | src/surface.zig | 18 | ||||
| -rw-r--r-- | src/syntax.zig | 114 | ||||
| -rw-r--r-- | test/column_drag.zig | 58 | ||||
| -rw-r--r-- | test/process/tty_images.zig | 2 | ||||
| -rw-r--r-- | test/process/tty_layout.zig | 141 | ||||
| -rw-r--r-- | test/snapshots/colgrip.golden | 147 | ||||
| -rw-r--r-- | test/snapshots/cornerdrag-left.golden | 86 | ||||
| -rw-r--r-- | test/snapshots/cornerdrag.golden | 239 | ||||
| -rw-r--r-- | test/snapshots/shrinktag.golden | 1 | ||||
| -rw-r--r-- | test/snapshots/windowops.golden | 162 |
21 files changed, 260 insertions, 1229 deletions
@@ -2103,8 +2103,12 @@ fn treeSitter(b: *std.Build, io: std.Io, target: std.Build.ResolvedTarget, c_opt (tree_sitter_grammars == .zig and g.tier == .zig)) grammar: { const dep = b.lazyDependency(g.dep, .{}) orelse break :grammar; - const query = configureRead(b, io, dep.builder.root, g.query, 0x100000) catch @panic("read " ++ g.name ++ " highlights"); - ts_queries.addOption([]const u8, g.name ++ "_highlights", query); + const upstream = configureRead(b, io, dep.builder.root, g.query, 0x100000) catch @panic("read " ++ g.name ++ " highlights"); + // the patterns that colour, filtered here once and not in + // every compile, and the whole query, the filter's test's + const query = std.mem.concat(b.allocator, u8, &.{ upstream, g.highlights_extra }) catch @panic("OOM"); + ts_queries.addOption([]const u8, g.name ++ "_highlights_unfiltered", query); + ts_queries.addOption([]const u8, g.name ++ "_highlights", grammar_manifest.colorQuery(query, b.allocator.alloc(u8, query.len) catch @panic("OOM"))); // helix's textobject queries, vendored (vendor/queries); a // grammar without one gets none const objects = configureRead(b, io, b.root, "vendor/queries/" ++ g.name ++ "/textobjects.scm", 0x100000) catch ""; diff --git a/docs/render-pipeline.md b/docs/render-pipeline.md index 64fa4e65..05bc8cfa 100644 --- a/docs/render-pipeline.md +++ b/docs/render-pipeline.md @@ -62,7 +62,7 @@ core. ## The window's composition Four fixed draw groups, bottom to top: the page and the panes, the -notices, the guides and the debug box the core paints over them, and the +notices, the debug box the core paints over them, and the ink (bar cursors); then the overlay (the pet, a jump's trail, the caret's quad). Decor is flat: rules, rails, grips, spines, notice rules and bar cursors as hard-edged rectangles read from the regions. diff --git a/docs/typ/cheatsheet.typ b/docs/typ/cheatsheet.typ index 5e373fac..e931effa 100644 --- a/docs/typ/cheatsheet.typ +++ b/docs/typ/cheatsheet.typ @@ -10,7 +10,7 @@ btn("B2"), [#word("Exec") the word or selection: a builtin, else a shell line.], btn("B3"), [#word("Look"): open the file, address, directory or URL, else find the word's next place. Resting the pointer tints what #btn("B3") would take.], [sweep], [drag #btn("B2") or #btn("B3") to #word("Exec") or #word("Look") exactly what you swept.], - [grip], [drag the box left of a tag: up/down resizes, onto another column moves the pane. A column's right edge drags its width.], + [grip], [drag the box left of a tag: up/down resizes, onto another column moves the pane. A column's box: sideways resizes, past a neighbour's middle moves the column.], ) === Chords: hold the first, click the next #pairs( diff --git a/docs/typ/themes.typ b/docs/typ/themes.typ index 97b42748..a78cf66c 100644 --- a/docs/typ/themes.typ +++ b/docs/typ/themes.typ @@ -109,7 +109,7 @@ take `null`, so older files stay valid: [`tag_active_bg`, `tag_active_fg`], [the focused pane's tag; a ground closer than 1.25:1 to `tag_bg` is pushed further the way it leans, as far as its text keeps its contrast. Absent: `tag_bg`, `tag_fg`], [`tagline_bg`, `tagline_fg`], [the tagline, the workspace row: an editor's status bar in its own colours (`dark_plus` has VS Code's blue). Absent: the tag's], [`tag_name_fg`, `tag_active_name_fg`], [the file name's or a terminal's #word("Term") tint, in normal and focused tags. Absent: the tag's foreground], - [`column_box`, `column_box_dim`], [a column's grip held (and its drag rail), and at rest. Absent: `num`; a mix of `column_box` and `tag_bg`], + [`column_box`, `column_box_dim`], [a column's grip held, and at rest. Absent: `num`; a mix of `column_box` and `tag_bg`], [`border`], [quiet separators, lifted to 1.6:1 when under 1.5:1 off the page. Absent: `scroll_track`], [`empty_col`], [a column with no pane, under its tag (acme: white). Absent: `border`], [`lineno_active`], [the current line number. Absent: `lineno`], diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md index 3297336e..da489b82 100644 --- a/src/CHANGELOG.md +++ b/src/CHANGELOG.md @@ -2,6 +2,19 @@ ## Unreleased +- A drag draws no guide lines: no dashes where a pane or column would + land, no rail for a carried column, no dashed seam under a pane rule + held. The line between two columns no longer resizes them (nor, at a + pane's corner, the panes too): a press there is a press in the pane. + A column resizes by its box, left of its tag; a pane by its own box, + or in a window by the rule above it. + +- An edit to the core recompiles it about 3 s sooner (`core-test`, 13 s to + 10 s): the build keeps each grammar's highlight patterns that pardes + colours once, where every compile of every program that takes the core + did it again, a quarter of its time. A package that depends on pardes + is given the same filtered queries. + - The core measures a grapheme's cells over uucode itself (`File.utf8Width`, libvaxis's `gwidth` to the cell on every scalar value), so libvaxis is the tui's and the gui's alone, not the core diff --git a/src/body_layer.zig b/src/body_layer.zig index 76aec179..dbf0156d 100644 --- a/src/body_layer.zig +++ b/src/body_layer.zig @@ -195,7 +195,7 @@ pub fn joinBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, layer.id = @intCast(id); layer.serial = pane.serial; const body = s.region(.body, id).?; - layer.viewport = .{ .x = body.rect.x, .y = body.rect.y, .w = body.rect.w - body.clip, .h = body.rect.h }; + layer.viewport = .{ .x = body.rect.x, .y = body.rect.y, .w = body.rect.w, .h = body.rect.h }; layer.cols = width; layer.rows = @intCast(logical_rows); layer.context_rows = pane.context_rows; diff --git a/src/draw.zig b/src/draw.zig index a0a28cc7..2fabff06 100644 --- a/src/draw.zig +++ b/src/draw.zig @@ -115,24 +115,6 @@ pub fn place(p: *Pardes, s: *Surface) void { } if (p.settings.workspace_tag) s.addRegion(.{ .kind = .workspace_tag, .rect = .{ .x = 0, .y = 0, .w = s.cols, .h = p.topBarHeight() } }); - // A column carried to the window's right edge shows where it lands as a - // rail in the last cell: the layers under it stop a cell short. - if (v.drag == .column_move) rail: { - const d = v.drag.column_move; - const source = layout.columnBySerial(p, d.serial) orelse break :rail; - const edge: u16 = switch (layout.columnDrop(p, source, d.cur_x, d.grab)) { - .stay => break :rail, - .reorder => |target| if (target < source) v.col_x[target] else v.col_x[target] + v.col_w[target], - .edge => |x| x, - }; - if (edge != s.cols) break :rail; - for (s.regions[0..s.nregions]) |*region| switch (region.kind) { - .body, .tag, .notice, .column_tag => if (region.rect.x + region.rect.w == s.cols) { - region.clip = 1; - }, - else => {}, - }; - } } /// A pane's grip in the grid: `box` focused, else halfway between its ring @@ -251,8 +233,6 @@ fn joinNotice(p: *Pardes, s: *Surface, arena: std.mem.Allocator, region: Region) if (layer.cursor) |caret| { if (caret.x >= skip) s.cursor = .{ .x = region.rect.x + caret.x - @as(u16, @intCast(skip)), .y = region.rect.y, .bar = caret.bar }; } - // Laid out at its full width; only shown short of the rail. - layer.viewport.w -|= region.clip; } pub fn render(p: *Pardes, arena: std.mem.Allocator) !*Surface { @@ -327,77 +307,6 @@ pub fn render(p: *Pardes, arena: std.mem.Allocator) !*Surface { try paintHeaders(p, s); - switch (v.drag) { - .border_v => |d| { - if (d.cur_x < s.cols) { - var row: u16 = p.topBarHeight(); - while (row < s.rows) : (row += 1) s.overlayDash(d.cur_x, row, "╎"); - s.addRegion(.{ .kind = .guide, .rect = .{ .x = d.cur_x, .y = p.topBarHeight(), .w = 1, .h = s.rows -| p.topBarHeight() } }); - } - if (d.corner) |k| if (d.cur_y < s.rows) { - const first = if (k.col == d.left_col) v.col_x[k.col] else d.cur_x +| 1; - const end = if (k.col == d.left_col) d.cur_x else v.col_x[k.col] +| v.col_w[k.col] -| 1; - var col = first; - while (col <= end and col < s.cols) : (col += 1) s.overlayDash(col, d.cur_y, "╌"); - if (col > first) s.addRegion(.{ .kind = .guide, .rect = .{ .x = first, .y = d.cur_y, .w = col - first, .h = 1 } }); - }; - }, - // A column that went away mid-drag has nothing to guide. - .border_h => |d| if (d.cur_y < s.rows and d.col < v.ncol and v.col_x[d.col] < s.cols) { - const end = @min(s.cols, v.col_x[d.col] + v.col_w[d.col]); - var col = v.col_x[d.col]; - while (col < end) : (col += 1) s.overlayDash(col, d.cur_y, "╌"); - s.addRegion(.{ .kind = .guide, .rect = .{ .x = v.col_x[d.col], .y = d.cur_y, .w = end - v.col_x[d.col], .h = 1 } }); - }, - .column_move => |d| rail: { - const source = layout.columnBySerial(p, d.serial) orelse break :rail; - if (s.cols == 0) break :rail; - // Where the column's left edge would land, reordered or not. - const edge: u16 = switch (layout.columnDrop(p, source, d.cur_x, d.grab)) { - .stay => break :rail, - .reorder => |target| if (target < source) v.col_x[target] else v.col_x[target] + v.col_w[target], - .edge => |x| x, - }; - // The layers under an outside rail stop a cell short of it: - // `place` clipped them. - // The rail runs in the seam cell left of the edge, where a - // border drag's does: the edge cell itself is a gutter, which - // the GUI paints as a scroll rail that swallowed the dashes. - // At the window's left edge there is no seam, so it runs just - // past that scroll rail instead. It takes the lit grip's - // color: this is where the grabbed column lands. - const x = @min(if (edge == 0) config.GUTTER - 1 else edge - 1, s.cols -| 1); - var row: u16 = p.topBarHeight(); - // A guide region for each run of it the tags do not break. - var run: u16 = row; - while (row < s.rows) : (row += 1) { - // Past the left edge's scroll rail the rail would cut - // through column 0's grip and pane boxes: leave them whole. - if (edge == 0 and s.at(x, row).style.font_role == .tagline) { - if (row > run) s.addRegion(.{ .kind = .guide, .rect = .{ .x = x, .y = run, .w = 1, .h = row - run } }); - run = row + 1; - continue; - } - s.overlayDash(x, row, "╎"); - s.at(x, row).style.fg = .{ .rgb = chrome.column_box }; - } - if (row > run) s.addRegion(.{ .kind = .guide, .rect = .{ .x = x, .y = run, .w = 1, .h = row - run } }); - }, - .move => |d| if (d.cur_x < s.cols) { - if (layout.movePlacement(p, d.id, d.cur_x, d.cur_y)) |placement| if (placement.row < s.rows and v.col_x[placement.preview_col] + v.col_w[placement.preview_col] <= s.cols) { - var col: u16 = v.col_x[placement.preview_col]; - while (col < v.col_x[placement.preview_col] + v.col_w[placement.preview_col]) : (col += 1) { - s.set(col, placement.row, "╌", .{ .fg = .{ .rgb = chrome.lineno } }); - } - s.set(d.cur_x, placement.row, "▌", .{ .fg = .{ .rgb = chrome.lineno } }); - s.addRegion(.{ .kind = .guide, .rect = .{ .x = v.col_x[placement.preview_col], .y = placement.row, .w = v.col_w[placement.preview_col], .h = 1 } }); - s.addRegion(.{ .kind = .guide, .rect = .{ .x = d.cur_x, .y = placement.row, .w = 1, .h = 1 } }); - }; - }, - // A hover draws no hint: columns resize by their grips. - .none, .select => {}, - } - // debug overlay: a small stats box drawn last, top-right ("Debug") if (p.settings.debug) if (p.panes[v.active]) |at| { var nlive: usize = 0; @@ -606,8 +515,6 @@ fn paintHeaders(p: *Pardes, s: *Surface) !void { const layer = &s.tag_layers[MAX_PANES + c]; try renderHeaderLayer(p, layer, .column, @intCast(c), region.rect, tagline.columnTag(p, c), top, bg, fg); if (v.col_x[c] < s.cols) joinHeaderRows(s, layer, fg); - // Laid out at its full width; only shown short of the rail. - layer.viewport.w -|= region.clip; }; } @@ -809,7 +716,7 @@ fn joinPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r layer.kind = .pane; layer.id = @intCast(id); layer.serial = pane.serial; - layer.viewport = .{ .x = region.rect.x, .y = region.rect.y, .w = region.rect.w - region.clip, .h = rows }; + layer.viewport = .{ .x = region.rect.x, .y = region.rect.y, .w = region.rect.w, .h = rows }; layer.cols = columns; layer.rows = rows; layer.context_rows = 0; diff --git a/src/grammar_manifest.zig b/src/grammar_manifest.zig index 38c54916..711c31a4 100644 --- a/src/grammar_manifest.zig +++ b/src/grammar_manifest.zig @@ -1,6 +1,7 @@ //! Dependency-free tree-sitter grammar metadata shared by build.zig and the -//! runtime syntax registry. Keep target symbols and query values out of this -//! file: the build runner imports it as host code. +//! runtime syntax registry, and the highlight-query filter the build runs. +//! Keep target symbols and query values out of this file: the build runner +//! imports it as host code. const std = @import("std"); @@ -14,6 +15,8 @@ pub const Grammar = struct { src: []const u8 = "src", scanner: bool = false, query: []const u8 = "queries/highlights.scm", + /// Patterns appended to the highlights query before it is filtered. + highlights_extra: []const u8 = "", }; pub const all = [_]Grammar{ @@ -48,7 +51,13 @@ pub const all = [_]Grammar{ .{ .name = "ruby", .dep = "ts_ruby", .exts = &.{ ".rb", ".rake" }, .tier = .full, .scanner = true }, .{ .name = "rust", .dep = "ts_rust", .exts = &.{".rs"}, .tier = .full, .scanner = true }, .{ .name = "scala", .dep = "ts_scala", .exts = &.{ ".scala", ".sc" }, .tier = .full, .scanner = true }, - .{ .name = "typst", .dep = "ts_typst", .exts = &.{ ".typ", ".typst" }, .tier = .full, .scanner = true, .query = "queries/typst/highlights.scm" }, + .{ .name = "typst", .dep = "ts_typst", .exts = &.{ ".typ", ".typst" }, .tier = .full, .scanner = true, .query = "queries/typst/highlights.scm", .highlights_extra = + \\ + \\(call item: (ident) @keyword) + \\(call item: (field field: (ident) @keyword)) + \\"#" @keyword + \\ + }, .{ .name = "zig", .dep = "ts_zig", .exts = &.{ ".zig", ".zon" }, .tier = .zig }, }; @@ -92,3 +101,96 @@ pub fn byPath(path: []const u8) ?usize { for (all, 0..) |g, i| for (g.exts) |e| if (std.ascii.eqlIgnoreCase(ext, e)) return i; return null; } + +/// pardes's syntax classes: what a capture colours a byte as. +pub const Syn = enum(u8) { none, keyword, string, number, comment }; + +pub fn synFor(name: []const u8) Syn { + for ([_]struct { []const u8, Syn }{ + .{ "comment", .comment }, + .{ "string", .string }, + .{ "character", .string }, + .{ "number", .number }, + .{ "numeric", .number }, + .{ "float", .number }, + .{ "boolean", .number }, + .{ "keyword", .keyword }, + .{ "include", .keyword }, + .{ "conditional", .keyword }, + .{ "repeat", .keyword }, + .{ "title", .keyword }, + .{ "uri", .string }, + .{ "reference", .number }, + .{ "heading", .keyword }, + .{ "strong", .comment }, + .{ "bold", .comment }, + .{ "emphasis", .number }, + .{ "italic", .number }, + .{ "literal", .string }, + .{ "raw", .string }, + }) |m| { + if (std.mem.indexOf(u8, name, m[0]) != null) return m[1]; + } + return .none; +} + +/// The patterns of highlights query `source` that capture a class (synFor), +/// written to `out` (source.len bytes): what a grammar's query compiles to. +/// build.zig filters each one with it, ts_queries' `<name>_highlights`. +pub fn colorQuery(source: []const u8, out: []u8) []u8 { + var written: usize = 0; + var at: usize = 0; + while (at < source.len) { + while (at < source.len) { + if (std.ascii.isWhitespace(source[at])) { + at += 1; + } else if (source[at] == ';') { + while (at < source.len and source[at] != '\n') at += 1; + } else break; + } + const begin = at; + var depth: usize = 0; + var colored = false; + var complete = false; + while (at < source.len) { + const byte = source[at]; + if (complete and (byte == '(' or byte == '[' or byte == '"')) break; + if (byte == ';') { + while (at < source.len and source[at] != '\n') at += 1; + continue; + } + if (byte == '"') { + at += 1; + while (at < source.len) : (at += 1) { + if (source[at] == '\\') { + at += 1; + } else if (source[at] == '"') { + at += 1; + break; + } + } + if (depth == 0) complete = true; + continue; + } + if (byte == '(' or byte == '[') depth += 1; + if (byte == ')' or byte == ']') { + depth -= 1; + if (depth == 0) complete = true; + } + if (byte == '@') { + const name = at + 1; + at = name; + while (at < source.len and (std.ascii.isAlphanumeric(source[at]) or + source[at] == '_' or source[at] == '.' or source[at] == '-')) at += 1; + colored = colored or synFor(source[name..at]) != .none; + continue; + } + at += 1; + } + if (colored) { + @memcpy(out[written..][0 .. at - begin], source[begin..at]); + written += at - begin; + } + } + return out[0..written]; +} diff --git a/src/gui/gui.zig b/src/gui/gui.zig index 202f4aa8..45157dd3 100644 --- a/src/gui/gui.zig +++ b/src/gui/gui.zig @@ -868,12 +868,12 @@ const Group = struct { }; /// The frame's draw groups, bottom to top: the page and the panes, the -/// notices floating over them, the guides and the debug box the core paints -/// over those, and ink (the bar cursors; the cursor's glide draws after it). +/// notices floating over them, the debug box the core paints over those, +/// and ink (the bar cursors; the cursor's glide draws after it). const Groups = struct { items: [4]Group = @splat(.{}), notices: usize = 1, - guides: usize = 2, + debug: usize = 2, ink: usize = 3, len: usize = 4, }; @@ -883,7 +883,7 @@ const Groups = struct { const Cover = packed struct(u16) { /// A layer draws it; the grid's copy is not drawn. layer: bool = false, - /// Under a guide or the debug box: drawn from the grid over the panes. + /// Under the debug box: drawn from the grid over the panes. floating: bool = false, /// In a pane's grip, `grip_offset` cells from its left: the grip's /// glyph is the cell that far to the left. @@ -950,7 +950,7 @@ fn coverFrame(cover: []Cover, cols: u16, rows: u16, body_layers: []const pardes. mark.rect(cover, cols, rows, .{ .x = region.rect.x, .y = 0, .w = 1, .h = rows }, "anchor", true); if (region.active) if (bar) |b| mark.rect(cover, cols, rows, .{ .x = region.rect.x, .y = b.y, .w = region.rect.w, .h = b.h }, "focus", true); }, - .guide, .debug => mark.rect(cover, cols, rows, region.rect, "floating", true), + .debug => mark.rect(cover, cols, rows, region.rect, "floating", true), else => {}, }; } @@ -4559,7 +4559,7 @@ fn renderFrame( while (col < surface.cols) : (col += 1) { const at = @as(usize, row) * surface.cols + col; if (covered[at].layer and !covered[at].floating) continue; - const group_index = if (covered[at].floating) groups.guides else 0; + const group_index = if (covered[at].floating) groups.debug else 0; groups.items[group_index].cell_count = std.math.add(u32, groups.items[group_index].cell_count, cellInstanceCount(&surface.cells[at])) catch return error.GpuCapacity; } } @@ -4608,7 +4608,7 @@ fn renderFrame( while (col < surface.cols) : (col += 1) { const at = @as(usize, row) * surface.cols + col; if (covered[at].layer and !covered[at].floating) continue; - const group_index = if (covered[at].floating) groups.guides else 0; + const group_index = if (covered[at].floating) groups.debug else 0; emitSurfaceCell( g, chrome, diff --git a/src/layout.zig b/src/layout.zig index fca4c846..0cfbf04a 100644 --- a/src/layout.zig +++ b/src/layout.zig @@ -180,8 +180,8 @@ pub fn columnDrop(p: *const Pardes, source: usize, x: u16, grab: u16) ColumnDrop } /// Share out the width of columns `left` and `left + 1` so the left one is -/// `left_width` cells, neither below MINW. A border drag and a column grip -/// dropped inside its own place both end here. +/// `left_width` cells, neither below MINW. A column grip dropped inside its +/// own place ends here. pub fn setColumnPairWidth(p: *Pardes, left: usize, left_width: u64) void { const v = p.view(); if (left + 1 >= v.ncol) return; @@ -2099,15 +2099,7 @@ test "repeated non-dyadic column splits preserve every unrelated boundary" { try std.testing.expect(splitColumn(p, 0, 1, false)); p.sync(); - const handle = p.view().col_x[0] + p.view().col_w[0] - 1; - const untouched = weightsOf(p); - p.update(.{ .mouse = .{ .button = .left, .kind = .press, .col = handle, .row = TOPBAR_H + 1 } }); - p.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = handle, .row = TOPBAR_H + 1 } }); - try std.testing.expectEqual(untouched, weightsOf(p)); - - p.update(.{ .mouse = .{ .button = .left, .kind = .press, .col = handle, .row = TOPBAR_H + 1 } }); - p.update(.{ .mouse = .{ .button = .left, .kind = .drag, .col = 417, .row = TOPBAR_H + 1 } }); - p.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = 417, .row = TOPBAR_H + 1 } }); + setColumnPairWidth(p, 0, 418); p.sync(); try std.testing.expectEqual(@as(u16, 418), p.view().rects[0].w); diff --git a/src/mouse.zig b/src/mouse.zig index 783b12b7..2ca984ba 100644 --- a/src/mouse.zig +++ b/src/mouse.zig @@ -1,6 +1,5 @@ //! The mouse: what a pointer is over, the three buttons' presses, drags and -//! releases (acme's chords, border and seam drags, gestures), and the -//! chrome targets a shell asks about. +//! releases (acme's chords, grip and seam drags, gestures). const pardes = @import("pardes.zig"); const tagline = @import("tagline.zig"); const exec = @import("exec.zig"); @@ -19,7 +18,6 @@ const Pane = panes.Pane; const MAX_PANES = pardes.MAX_PANES; const Layer = @import("Layer.zig"); const Jump = @import("Jump.zig"); -const TOPBAR_H = pardes.TOPBAR_H; const BOX_H = pardes.BOX_H; const TAG_TEXT_INSET = pardes.TAG_TEXT_INSET; const Builtin = pardes.Builtin; @@ -29,7 +27,6 @@ const Pardes = pardes.Pardes; pub const Drag = union(enum) { none, - border_v: struct { left_col: usize, cur_x: u16, corner: ?struct { col: usize, idx: usize } = null, cur_y: u16 = 0 }, border_h: struct { col: usize, top_idx: usize, cur_y: u16 }, move: struct { id: usize, cur_x: u16, cur_y: u16 }, /// `grab`: how far into the grip it was pressed, so the column's left @@ -58,7 +55,7 @@ pub const Drag = union(enum) { fn button(drag: Drag) ?Mouse.Button { return switch (drag) { .none => null, - .border_v, .border_h, .move, .column_move => config.select_button, + .border_h, .move, .column_move => config.select_button, .select => |selection| selection.button, }; } @@ -126,38 +123,6 @@ fn seamRowOf(p: *const Pardes, c: usize, k: usize) u16 { return r.y + r.h -| 1; } -pub const ChromeTarget = struct { col: u16, row: u16 }; - -/// The chrome a press at `col`, `row` takes: the tag rows; then, -/// on the cell, a pane's grip, a column's handle or a seam; then a cell -/// away, any of a pane's tag, a handle or a seam. -pub fn chromeTarget(p: *const Pardes, col: u16, row: u16) ?ChromeTarget { - const v = p.view(); - if (row < p.topBarHeight() + layout.columnBarHeight(p)) return .{ .col = col, .row = row }; - for ([_]u16{ 0, 1 }) |slack| { - for (p.panes, 0..) |slot, id| { - const pane = slot orelse continue; - const rect = v.rects[id]; - const tag = p.tagTop(pane, rect); - const edge = if (slack == 0) rect.x + config.GUTTER else rect.x + rect.w; - if (row >= tag and row < tag + pane.tag_rows and col >= rect.x and col < rect.x + rect.w and col < edge) - return .{ .col = col, .row = row }; - } - for (0..p.view().ncol -| 1) |column| { - const handle = v.col_x[column] + v.col_w[column] -| 1; - if (@max(col, handle) - @min(col, handle) == slack) return .{ .col = handle, .row = row }; - } - for (0..p.view().ncol) |column| { - if (col < v.col_x[column] or col >= v.col_x[column] + v.col_w[column]) continue; - for (0..p.view().cols[column].n -| 1) |index| { - const seam = seamRowOf(p, column, index); - if (@max(row, seam) - @min(row, seam) == slack) return .{ .col = col, .row = seam }; - } - } - } - return null; -} - pub fn paneAt(p: *const Pardes, col: u16, row: u16) ?usize { for (p.panes, 0..) |slot, id| { if (slot == null) continue; @@ -781,18 +746,6 @@ pub fn handleMouse(p: *Pardes, event: Mouse) void { return; } } - for (0..p.view().ncol -| 1) |c| { - if (mcol == v.col_x[c] + v.col_w[c] -| 1) { - const corner: @FieldType(@FieldType(Drag, "border_v"), "corner") = if (seamIdxAt(p, c, mrow)) |k| - .{ .col = c, .idx = k } - else if (seamIdxAt(p, c + 1, mrow)) |k| - .{ .col = c + 1, .idx = k } - else - null; - v.drag = .{ .border_v = .{ .left_col = c, .cur_x = mcol, .corner = corner, .cur_y = mrow } }; - return; - } - } // Two panes are resized on the rule between them, never on a // row of text; with no rule, by the grip, as acme moves a // window by its button. @@ -923,12 +876,6 @@ fn seamIdxAt(p: *const Pardes, c: usize, mrow: u16) ?usize { return null; } -fn clampBorderCol(lx: u16, lw: u16, rw: u16, mcol: u16) u16 { - const lo = lx + config.MINW; - const hi = lx +| lw +| rw -| config.MINW; - return if (lo <= hi) std.math.clamp(mcol, lo, hi) else mcol; -} - fn clampBorderRow(ay: u16, ah: u16, bh: u16, mrow: u16) u16 { const lo = ay + BOX_H - 1; const hi = ay +| ah +| bh -| (BOX_H + 1); @@ -938,20 +885,6 @@ fn clampBorderRow(ay: u16, ah: u16, bh: u16, mrow: u16) u16 { pub fn dragUpdate(p: *Pardes, mcol: u16, mrow: u16, body_hit: ?Mouse.BodyHit) void { const v = p.view(); switch (v.drag) { - .border_v => |*d| { - const c = d.left_col; - d.cur_x = if (c + 1 < v.ncol) - clampBorderCol(v.col_x[c], v.col_w[c], v.col_w[c + 1], mcol) - else - mcol; - if (d.corner) |k| if (k.idx + 1 < v.cols[k.col].n) { - const a = v.rects[v.cols[k.col].panes[k.idx]]; - const b = v.rects[v.cols[k.col].panes[k.idx + 1]]; - d.cur_y = clampBorderRow(a.y, a.h, b.h, mrow); - } else { - d.cur_y = mrow; - }; - }, .border_h => |*d| { const cc = d.col; const k = d.top_idx; @@ -1239,18 +1172,6 @@ fn dragRelease(p: *Pardes, button: Mouse.Button) void { defer v.drag = .none; defer v.chord_hold = false; switch (v.drag) { - .border_v => |d| { - const c = d.left_col; - const old_seam = v.col_x[c] + v.col_w[c] -| 1; - // the handle is the left pane's LAST column (inclusive), so - // the new width includes it — a no-drag click changes nothing - if (c + 1 < v.ncol and d.cur_x != old_seam) - layout.setColumnPairWidth(p, c, (d.cur_x + 1) -| v.col_x[c]); - if (d.corner) |k| { - if (d.cur_y != seamRowOf(p, k.col, k.idx)) - layout.applyRowSplit(p, k.col, k.idx, d.cur_y); - } - }, .border_h => |d| if (d.cur_y != seamRowOf(p, d.col, d.top_idx)) layout.applyRowSplit(p, d.col, d.top_idx, d.cur_y), .column_move => |d| if (layout.columnBySerial(p, d.serial)) |column| switch (layout.columnDrop(p, column, d.cur_x, d.grab)) { @@ -1391,7 +1312,7 @@ fn dragRelease(p: *Pardes, button: Mouse.Button) void { const test_metrics: pardes.RowMetrics = .{ .body_w = 10, .body_h = 20, .tagline_w = 6, .tagline_h = 12 }; -fn cornerFixture(gpa: std.mem.Allocator) !*Pardes { +fn twoColumns(gpa: std.mem.Allocator) !*Pardes { const p = try Pardes.init(gpa, .{ .cols = 100, .rows = 30, .shells = 3 }); p.update(.{ .resize = .{ .cols = 100, .rows = 30 } }); p.view().active = p.view().cols[1].panes[0]; @@ -1463,7 +1384,7 @@ fn layerCenter(layer: *const Layer, col: u16, comptime tag: bool) [2]f32 { } test "a pane's last row of text is no resize handle; the rule over the next pane is" { - const p = try cornerFixture(std.testing.allocator); + const p = try twoColumns(std.testing.allocator); defer p.deinit(); const seam = seamRowOf(p, 1, 0); const inside = p.view().col_x[1] + p.view().col_w[1] / 2; @@ -1473,8 +1394,22 @@ test "a pane's last row of text is no resize handle; the rule over the next pane try std.testing.expect(nudgeRightSeam(p, 2) == seam + 2); } +test "the line between two columns is no resize handle: a press there is a sweep in the pane" { + const p = try twoColumns(std.testing.allocator); + defer p.deinit(); + const line = p.view().col_x[0] + p.view().col_w[0] - 1; + const row = p.view().rects[p.view().cols[0].panes[0]].y + BOX_H + 1; + const weight = p.view().cols[0].weight; + p.update(.{ .mouse = .{ .button = .left, .kind = .press, .col = line, .row = row } }); + try std.testing.expect(p.view().drag == .select); + p.update(.{ .mouse = .{ .button = .left, .kind = .drag, .col = line + 8, .row = row } }); + p.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = line + 8, .row = row } }); + p.sync(); + try std.testing.expectEqual(weight, p.view().cols[0].weight); +} + test "a pane's grip dragged up or down its own column moves its top, down to the floor of the pane above" { - const p = try cornerFixture(std.testing.allocator); + const p = try twoColumns(std.testing.allocator); defer p.deinit(); const upper = p.view().cols[1].panes[0]; const lower = p.view().cols[1].panes[1]; @@ -1499,26 +1434,6 @@ test "a pane's grip dragged up or down its own column moves its top, down to the try std.testing.expectEqual(to, p.view().rects[lower].y); } -test "a press near chrome takes it: the tag rows, a column's handle or a seam on its cell or a cell away, a pane's tag; nothing in a body" { - const p = try cornerFixture(std.testing.allocator); - defer p.deinit(); - // Column 0's two panes share its rows evenly; column 1's lower one is - // tall, its middle a body row. - const handle = p.view().col_x[0] + p.view().col_w[0] - 1; - const seam = seamRowOf(p, 0, 0); - const mid = p.view().col_x[0] + p.view().col_w[0] / 2; - const top = p.view().rects[p.view().cols[0].panes[0]].y; - const low = p.view().rects[p.view().cols[1].panes[1]]; - const body = low.y + low.h / 2; - try std.testing.expectEqual(ChromeTarget{ .col = 5, .row = 0 }, chromeTarget(p, 5, 0).?); - try std.testing.expectEqual(ChromeTarget{ .col = handle, .row = body }, chromeTarget(p, handle, body).?); - try std.testing.expectEqual(ChromeTarget{ .col = handle, .row = body }, chromeTarget(p, handle + 1, body).?); - try std.testing.expectEqual(ChromeTarget{ .col = mid, .row = seam }, chromeTarget(p, mid, seam).?); - try std.testing.expectEqual(ChromeTarget{ .col = mid, .row = seam }, chromeTarget(p, mid, seam - 1).?); - try std.testing.expectEqual(ChromeTarget{ .col = mid, .row = top }, chromeTarget(p, mid, top).?); - try std.testing.expect(chromeTarget(p, mid, seam - 3) == null); -} - test "plain left click clears explicit modal selection" { const gpa = std.testing.allocator; // Wide enough for the tag on one row: the body starts under it. @@ -1558,144 +1473,6 @@ test "a selection drag and its release leave the selection done" { try std.testing.expectEqual(.done, pane.sel[sel_slot].state); } -test "a corner drag's two axes clamp independently" { - // a 100-wide window split 50/50, and a 30-row column split 15/14 under the - // topbar: the shape windowops.snap drives - const lx: u16 = 0; - const lw: u16 = 50; - const rw: u16 = 50; - const ay: u16 = TOPBAR_H; - const ah: u16 = 15; - const bh: u16 = 14; - const row_lo: u16 = ay + BOX_H - 1; - const row_hi: u16 = ay + ah + bh - (BOX_H + 1); - - // each axis alone, at both walls - try std.testing.expectEqual(@as(u16, config.MINW), clampBorderCol(lx, lw, rw, 0)); - try std.testing.expectEqual(@as(u16, 100 - config.MINW), clampBorderCol(lx, lw, rw, 999)); - try std.testing.expectEqual(row_lo, clampBorderRow(ay, ah, bh, 0)); - try std.testing.expectEqual(row_hi, clampBorderRow(ay, ah, bh, 999)); - - // THE corner property: drag off the right edge while staying mid-height — - // x sits at its wall, y still tracks the mouse row exactly - try std.testing.expectEqual(@as(u16, 100 - config.MINW), clampBorderCol(lx, lw, rw, 999)); - try std.testing.expectEqual(@as(u16, 12), clampBorderRow(ay, ah, bh, 12)); - // and the mirror: pinned at the bottom, x still free - try std.testing.expectEqual(row_hi, clampBorderRow(ay, ah, bh, 999)); - try std.testing.expectEqual(@as(u16, 40), clampBorderCol(lx, lw, rw, 40)); - // both pinned at once is just both walls, not a stuck gesture - try std.testing.expectEqual(@as(u16, config.MINW), clampBorderCol(lx, lw, rw, 0)); - try std.testing.expectEqual(row_hi, clampBorderRow(ay, ah, bh, 999)); - - // degenerate pairs pass through untouched, each on its own terms: a pane - // pair with no room stays draggable even when the column pair has room - try std.testing.expectEqual(@as(u16, 7), clampBorderCol(0, 5, 5, 7)); - try std.testing.expectEqual(@as(u16, 40), clampBorderCol(lx, lw, rw, 40)); - try std.testing.expectEqual(@as(u16, 9), clampBorderRow(TOPBAR_H, 1, 0, 9)); -} - -test "a v-handle press at the RIGHT column's seam drags both boundaries" { - const p = try cornerFixture(std.testing.allocator); - defer p.deinit(); - try std.testing.expectEqual(@as(usize, 2), p.view().cols[1].n); - - const handle = p.view().col_x[0] + p.view().col_w[0] - 1; - const right_seam = nudgeRightSeam(p, 3); - try std.testing.expect(right_seam != seamRowOf(p, 0, 0)); - - const w0 = p.view().cols[0].weight; - const v_left = p.panes[p.view().cols[0].panes[0]].?.vweight; - const v_right = p.panes[p.view().cols[1].panes[0]].?.vweight; - - p.update(.{ .mouse = .{ .button = .left, .kind = .press, .col = handle, .row = right_seam } }); - try std.testing.expect(p.view().drag == .border_v); - const corner = p.view().drag.border_v.corner orelse return error.NoCorner; - try std.testing.expectEqual(@as(usize, 1), corner.col); - try std.testing.expectEqual(@as(usize, 0), corner.idx); - - p.update(.{ .mouse = .{ .button = .left, .kind = .drag, .col = handle + 8, .row = right_seam - 4 } }); - p.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = handle + 8, .row = right_seam - 4 } }); - p.sync(); - - // both halves committed: the column pair widened, and the RIGHT column's - // pane pair reweighted — while the left column's panes stayed put - try std.testing.expect(p.view().cols[0].weight > w0); - try std.testing.expect(p.panes[p.view().cols[1].panes[0]].?.vweight != v_right); - try std.testing.expectEqual(v_left, p.panes[p.view().cols[0].panes[0]].?.vweight); -} - -test "a tie row still moves the LEFT column's pane pair only" { - const p = try cornerFixture(std.testing.allocator); - defer p.deinit(); - - // put column 1's seam exactly on column 0's, the row the eye reads as one - // line across the whole window - const left_seam = seamRowOf(p, 0, 0); - _ = nudgeRightSeam(p, @as(i32, left_seam) - @as(i32, seamRowOf(p, 1, 0))); - try std.testing.expectEqual(left_seam, seamRowOf(p, 1, 0)); - - const handle = p.view().col_x[0] + p.view().col_w[0] - 1; - const v_left = p.panes[p.view().cols[0].panes[0]].?.vweight; - const v_right = p.panes[p.view().cols[1].panes[0]].?.vweight; - - p.update(.{ .mouse = .{ .button = .left, .kind = .press, .col = handle, .row = left_seam } }); - const corner = p.view().drag.border_v.corner orelse return error.NoCorner; - try std.testing.expectEqual(@as(usize, 0), corner.col); - - p.update(.{ .mouse = .{ .button = .left, .kind = .drag, .col = handle, .row = left_seam - 4 } }); - p.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = handle, .row = left_seam - 4 } }); - p.sync(); - try std.testing.expect(p.panes[p.view().cols[0].panes[0]].?.vweight != v_left); - try std.testing.expectEqual(v_right, p.panes[p.view().cols[1].panes[0]].?.vweight); -} - -test "a v-handle press at nobody's seam is still a plain edge drag" { - const p = try cornerFixture(std.testing.allocator); - defer p.deinit(); - const right_seam = nudgeRightSeam(p, 3); - const left_seam = seamRowOf(p, 0, 0); - - const handle = p.view().col_x[0] + p.view().col_w[0] - 1; - var row: u16 = TOPBAR_H + 1; - while (row == left_seam or row == right_seam) row += 1; - - const w0 = p.view().cols[0].weight; - const v_left = p.panes[p.view().cols[0].panes[0]].?.vweight; - const v_right = p.panes[p.view().cols[1].panes[0]].?.vweight; - p.update(.{ .mouse = .{ .button = .left, .kind = .press, .col = handle, .row = row } }); - try std.testing.expect(p.view().drag == .border_v); - try std.testing.expect(p.view().drag.border_v.corner == null); - p.update(.{ .mouse = .{ .button = .left, .kind = .drag, .col = handle + 8, .row = row + 5 } }); - p.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = handle + 8, .row = row + 5 } }); - p.sync(); - // exactly ONE boundary moved - try std.testing.expect(p.view().cols[0].weight > w0); - try std.testing.expectEqual(v_left, p.panes[p.view().cols[0].panes[0]].?.vweight); - try std.testing.expectEqual(v_right, p.panes[p.view().cols[1].panes[0]].?.vweight); -} - -test "a RIGHT-column corner's two axes clamp independently" { - const p = try cornerFixture(std.testing.allocator); - defer p.deinit(); - const right_seam = nudgeRightSeam(p, 3); - const handle = p.view().col_x[0] + p.view().col_w[0] - 1; - p.update(.{ .mouse = .{ .button = .left, .kind = .press, .col = handle, .row = right_seam } }); - try std.testing.expectEqual(@as(usize, 1), (p.view().drag.border_v.corner orelse return error.NoCorner).col); - - // off the right edge at mid-height: x parks at its MINW wall, y is the mouse - p.update(.{ .mouse = .{ .button = .left, .kind = .drag, .col = 999, .row = right_seam } }); - try std.testing.expectEqual(@as(u16, 100 - config.MINW), p.view().drag.border_v.cur_x); - try std.testing.expectEqual(right_seam, p.view().drag.border_v.cur_y); - - // and the mirror: below the bottom at mid-width. y parks, x tracks again - p.update(.{ .mouse = .{ .button = .left, .kind = .drag, .col = handle, .row = 999 } }); - try std.testing.expectEqual(handle, p.view().drag.border_v.cur_x); - const a = p.view().rects[p.view().cols[1].panes[0]]; - const b = p.view().rects[p.view().cols[1].panes[1]]; - try std.testing.expectEqual(clampBorderRow(a.y, a.h, b.h, 999), p.view().drag.border_v.cur_y); - p.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = handle, .row = 999 } }); -} - test "mouse thumb buttons navigate once and clear selection gestures" { const p = try Pardes.init(std.testing.allocator, .{ .cols = 60, .rows = 12 }); defer p.deinit(); diff --git a/src/surface.zig b/src/surface.zig index 46b6c664..c0f352ee 100644 --- a/src/surface.zig +++ b/src/surface.zig @@ -204,8 +204,6 @@ pub const Region = struct { /// A column below the workspace tag, its bar and panes: its left /// edge is the spine a pixel shell rules down it. column, - /// A drag's guide or a seam's hover hint, drawn over the panes. - guide, /// The debug stats box, drawn over the panes. debug, }; @@ -243,15 +241,9 @@ pub const Region = struct { /// it shows, in pixels. Its placements are laid at the whole pixel; a /// pixel frontend draws them the fraction higher. scroll_px: f64 = 0, - /// Cells the column-move rail takes off the right edge while it runs - /// there: layers and pixel shells stop short of them, the grid does not. - clip: u16 = 0, }; -/// Guides a frame can draw: a run of a column-move rail per pane it skips -/// the tags of, and a handful of border and hover dashes. -pub const MAX_GUIDES = MAX_PANES + 4; -pub const MAX_REGIONS = 1 + MAX_PANES * (4 + panes.Pane.Notices.max) + pardes.MAX_COLS * 3 + 1 + MAX_GUIDES + 1; +pub const MAX_REGIONS = 1 + MAX_PANES * (4 + panes.Pane.Notices.max) + pardes.MAX_COLS * 3 + 1 + 1; /// The colours a pixel shell draws its chrome in (rules, rails, grips, the /// tag underlay), resolved by the core each frame, so a frontend attached @@ -471,14 +463,6 @@ pub const Surface = struct { while (xx < x + w) : (xx += 1) s.at(xx, yy).* = .{}; } } - - /// swap ONLY the glyph, keeping the cell's colors — the resize-handle hint - pub fn overlayDash(s: *Surface, x: u16, y: u16, glyph: []const u8) void { - const c = s.at(x, y); - @memcpy(c.text[0..glyph.len], glyph); - c.len = @intCast(glyph.len); - c.default = false; - } }; test "cell visual equality ignores dead grapheme tail bytes" { diff --git a/src/syntax.zig b/src/syntax.zig index 2526e113..8533aaa9 100644 --- a/src/syntax.zig +++ b/src/syntax.zig @@ -22,7 +22,7 @@ const ts_queries = if (enabled) @import("ts_queries") else struct {}; const LanguageFn = *const fn () callconv(.c) *const ts.Language; -pub const Syn = enum(u8) { none, keyword, string, number, comment }; +pub const Syn = grammar_manifest.Syn; /// A query compiled when first asked for: "" for none, null when it fails. const Lazy = struct { src: []const u8 = "", query: ?*ts.Query = null, failed: bool = false }; @@ -55,81 +55,6 @@ fn specCount() comptime_int { } return count; } -const typst_supplement = - \\ - \\(call item: (ident) @keyword) - \\(call item: (field field: (ident) @keyword)) - \\"#" @keyword - \\ -; - -fn querySrc(comptime g: grammar_manifest.Grammar) []const u8 { - const base = @field(ts_queries, g.name ++ "_highlights"); - const source = if (comptime std.mem.eql(u8, g.name, "typst")) base ++ typst_supplement else base; - return comptime colorQuery(source); -} - -fn colorQuery(comptime source: []const u8) []const u8 { - @setEvalBranchQuota(2_000_000); - var result: [source.len]u8 = undefined; - var written: usize = 0; - var at: usize = 0; - while (at < source.len) { - while (at < source.len) { - if (std.ascii.isWhitespace(source[at])) { - at += 1; - } else if (source[at] == ';') { - while (at < source.len and source[at] != '\n') at += 1; - } else break; - } - const begin = at; - var depth: usize = 0; - var colored = false; - var complete = false; - while (at < source.len) { - const byte = source[at]; - if (complete and (byte == '(' or byte == '[' or byte == '"')) break; - if (byte == ';') { - while (at < source.len and source[at] != '\n') at += 1; - continue; - } - if (byte == '"') { - at += 1; - while (at < source.len) : (at += 1) { - if (source[at] == '\\') { - at += 1; - } else if (source[at] == '"') { - at += 1; - break; - } - } - if (depth == 0) complete = true; - continue; - } - if (byte == '(' or byte == '[') depth += 1; - if (byte == ')' or byte == ']') { - depth -= 1; - if (depth == 0) complete = true; - } - if (byte == '@') { - const name = at + 1; - at = name; - while (at < source.len and (std.ascii.isAlphanumeric(source[at]) or - source[at] == '_' or source[at] == '.' or source[at] == '-')) at += 1; - colored = colored or synFor(source[name..at]) != .none; - continue; - } - at += 1; - } - if (colored) { - @memcpy(result[written..][0 .. at - begin], source[begin..at]); - written += at - begin; - } - } - const filtered = result[0..written].*; - return &filtered; -} - fn initSpecs() [specCount()]Spec { var out: [specCount()]Spec = undefined; var i = 0; @@ -139,7 +64,7 @@ fn initSpecs() [specCount()]Spec { .name = g.name, .exts = g.exts, .language = @extern(LanguageFn, .{ .name = "tree_sitter_" ++ g.name }), - .query_src = querySrc(g), + .query_src = @field(ts_queries, g.name ++ "_highlights"), .objects = .{ .src = @field(ts_queries, g.name ++ "_textobjects") }, .indents = .{ .src = @field(ts_queries, g.name ++ "_indents") }, }; @@ -219,7 +144,7 @@ fn ensure(spec: *Spec) !Selected { const capture_styles = spec.capture_styles[0..query.captureCount()]; for (capture_styles, 0..) |*style, id| { const name = query.captureNameForId(@intCast(id)) orelse ""; - style.* = @backingInt(synFor(name)); + style.* = @backingInt(grammar_manifest.synFor(name)); if (style.* == 0) query.disableCapture(name); } const parser = ts.Parser.create(); @@ -260,34 +185,6 @@ fn runQuery(styles: []u8, sel: Selected, tree: *ts.Tree, base: usize) void { } } -fn synFor(name: []const u8) Syn { - for ([_]struct { []const u8, Syn }{ - .{ "comment", .comment }, - .{ "string", .string }, - .{ "character", .string }, - .{ "number", .number }, - .{ "numeric", .number }, - .{ "float", .number }, - .{ "boolean", .number }, - .{ "keyword", .keyword }, - .{ "include", .keyword }, - .{ "conditional", .keyword }, - .{ "repeat", .keyword }, - .{ "title", .keyword }, - .{ "uri", .string }, - .{ "reference", .number }, - .{ "heading", .keyword }, - .{ "strong", .comment }, - .{ "bold", .comment }, - .{ "emphasis", .number }, - .{ "italic", .number }, - .{ "literal", .string }, - .{ "raw", .string }, - }) |m| { - if (std.mem.indexOf(u8, name, m[0]) != null) return m[1]; - } - return .none; -} pub fn highlightFileRange(gpa: std.mem.Allocator, path: []const u8, content: []const u8, start_raw: usize, end_raw: usize) ![]u8 { const zone = tracy.zone(@src(), "highlightFileRange"); defer zone.end(); @@ -1909,8 +1806,7 @@ test "syntax query filtering preserves upstream colors" { inline for (grammar_manifest.all) |grammar| { if (comptime grammarSelected(grammar)) { const selected = (try forLang(grammar.name)).?; - const raw_source = @field(ts_queries, grammar.name ++ "_highlights") ++ - (if (comptime std.mem.eql(u8, grammar.name, "typst")) typst_supplement else ""); + const raw_source = @field(ts_queries, grammar.name ++ "_highlights_unfiltered"); var error_offset: u32 = 0; const raw_query = try ts.Query.create(selected.lang, raw_source, &error_offset); defer raw_query.destroy(); @@ -1918,7 +1814,7 @@ test "syntax query filtering preserves upstream colors" { reference.query = raw_query; reference.capture_styles = try std.testing.allocator.alloc(u8, raw_query.captureCount()); defer std.testing.allocator.free(reference.capture_styles); - for (reference.capture_styles, 0..) |*style, id| style.* = @backingInt(synFor(raw_query.captureNameForId(@intCast(id)) orelse "")); + for (reference.capture_styles, 0..) |*style, id| style.* = @backingInt(grammar_manifest.synFor(raw_query.captureNameForId(@intCast(id)) orelse "")); const tree = selected.parser.parseString(source, null) orelse return error.ParseFailed; defer tree.destroy(); var expected: [source.len]u8 = @splat(0); diff --git a/test/column_drag.zig b/test/column_drag.zig index e64656e3..a12ca16f 100644 --- a/test/column_drag.zig +++ b/test/column_drag.zig @@ -84,7 +84,6 @@ test "column grip drag moves only its interval and keeps tag caret with the colu try std.testing.expect(p.view().drag == .column_move); mouse(p, .drag, target); _ = try p.render(frame.allocator()); - try std.testing.expectEqual(p.view().col_w[3] - pardes.TAG_TEXT_INSET - 1, (try tagLayer(p, 3)).viewport.w); try std.testing.expectEqual(last_rect, p.view().rects[p.view().cols[3].panes[0]]); try std.testing.expectEqual(last_columns, (try tagLayer(p, 3)).cols); try expectOrder(p, &before, &.{ 0, 1, 2, 3 }); @@ -121,7 +120,7 @@ test "column grip drag moves only its interval and keeps tag caret with the colu try std.testing.expect(p.view().drag == .none); } -test "column grip is separate from compact text and the resize seam" { +test "column grip is separate from compact text" { const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 24 }); defer p.deinit(); _ = try p.setTestFile("body\n"); @@ -160,11 +159,6 @@ test "column grip is separate from compact text and the resize seam" { mouse(p, .press, p.view().col_x[1] + config.GUTTER - 1); try std.testing.expect(p.view().drag == .column_move); mouse(p, .release, p.view().col_x[1] + config.GUTTER - 1); - const seam = p.view().col_x[0] + p.view().col_w[0] - 1; - const body_row = p.view().rects[p.view().cols[0].panes[0]].y + pardes.BOX_H + 1; - p.update(.{ .mouse = .{ .button = .left, .kind = .press, .col = seam, .row = body_row } }); - try std.testing.expect(p.view().drag == .border_v); - p.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = seam, .row = body_row } }); } test "column grips stay blank, and muted across focus and hover until grabbed" { @@ -238,32 +232,7 @@ test "column grip dropped in its own place moves the column's left edge" { try std.testing.expectEqual(serials[0], p.view().cols[1].serial); } -/// The column of the drag preview's rail, checked to run the full height -/// below the workspace tag in the grabbed grip's color, except through the -/// grip and pane boxes at the window's left edge. -fn previewRail(p: *Pardes, frame: *std.heap.ArenaAllocator) !?u16 { - _ = frame.reset(.retain_capacity); - const surface = try p.render(frame.allocator()); - const lit: pardes.Color = .{ .rgb = p.chromeTheme().column_box }; - var found: ?u16 = null; - for (0..surface.cols) |x| { - if (!std.mem.eql(u8, surface.at(@intCast(x), surface.rows - 1).grapheme(), "╎")) continue; - try std.testing.expect(found == null); - found = @intCast(x); - for (p.topBarHeight()..surface.rows) |row| { - const cell = surface.at(@intCast(x), @intCast(row)); - if (x < config.GUTTER and cell.style.font_role == .tagline) { - try std.testing.expect(!std.mem.eql(u8, cell.grapheme(), "╎")); - continue; - } - try std.testing.expectEqualStrings("╎", cell.grapheme()); - try std.testing.expectEqual(lit, cell.style.fg); - } - } - return found; -} - -test "column grip drag previews where the column lands, in the seam beside its rule" { +test "column grip drag lands where it is carried, lighting no word on the way" { const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 24 }); defer p.deinit(); _ = try p.setTestFile("body\n"); @@ -278,15 +247,10 @@ test "column grip drag previews where the column lands, in the seam beside its r _ = try p.render(frame.allocator()); const serials = .{ p.view().cols[0].serial, p.view().cols[1].serial, p.view().cols[2].serial }; - // Held on its own grip it lands nowhere new: no rail. + // Over the first column's left half it goes first. mouse(p, .press, p.view().col_x[1]); - mouse(p, .drag, p.view().col_x[1] + 1); - try std.testing.expectEqual(@as(?u16, null), try previewRail(p, &frame)); - // Over the first column's left half it goes first. The window edge has - // no seam, and the gutter there is the GUI's scroll rail, so the rail - // runs in the gutter's last cell. mouse(p, .drag, 3); - try std.testing.expectEqual(@as(?u16, config.GUTTER - 1), try previewRail(p, &frame)); + _ = try p.render(frame.allocator()); // The pointer is over the first column's "New", but a carried column // aims at a place: no word lights under it. for (0..p.view().screen_w) |x| try std.testing.expect(!std.meta.eql(p.surface.at(@intCast(x), pardes.TOPBAR_H).style.bg, pardes.Color{ .rgb = p.theme().sel_bg })); @@ -294,28 +258,18 @@ test "column grip drag previews where the column lands, in the seam beside its r try std.testing.expectEqual(serials[1], p.view().cols[0].serial); try std.testing.expectEqual(serials[0], p.view().cols[1].serial); - // Past the middle column's middle it lands after it: the rail is in the - // seam cell left of the last column's rule, where a border drag's is. + // Past the last column's middle it goes last. mouse(p, .press, p.view().col_x[0]); - const past = p.view().col_x[1] + p.view().col_w[1] - 2; - mouse(p, .drag, past); - try std.testing.expectEqual(@as(?u16, p.view().col_x[2] - 1), try previewRail(p, &frame)); - // Past the last column's middle: the window's last cell. mouse(p, .drag, p.view().col_x[2] + p.view().col_w[2] - 1); - try std.testing.expectEqual(@as(?u16, p.view().screen_w - 1), try previewRail(p, &frame)); mouse(p, .release, p.view().col_x[2] + p.view().col_w[2] - 1); try std.testing.expectEqual(serials[0], p.view().cols[0].serial); try std.testing.expectEqual(serials[2], p.view().cols[1].serial); try std.testing.expectEqual(serials[1], p.view().cols[2].serial); - // Short of a neighbour's middle the left edge moves, and the preview - // is the seam that edge will have: exactly where the release puts it. + // Short of a neighbour's middle the left edge moves. const edge = p.view().col_x[2]; mouse(p, .press, edge + 1); - mouse(p, .drag, edge + 1 - 6); - try std.testing.expectEqual(@as(?u16, edge - 6 - 1), try previewRail(p, &frame)); mouse(p, .release, edge + 1 - 6); _ = try p.render(frame.allocator()); try std.testing.expectEqual(edge - 6, p.view().col_x[2]); - try std.testing.expectEqual(@as(?u16, null), try previewRail(p, &frame)); } diff --git a/test/process/tty_images.zig b/test/process/tty_images.zig index dea9feef..5c39d4f3 100644 --- a/test/process/tty_images.zig +++ b/test/process/tty_images.zig @@ -50,7 +50,7 @@ fn images(gpa: std.mem.Allocator, exe: [:0]const u8) !void { // the tag takes an edit like any other pane's now — nothing live left in it to // protect, so the image early-return in enterTagEdit is gone. The image-state // prefix is wider than this source-local column, so widen the grid for this - // final assertion. (A column-border drag intentionally takes width from only + // final assertion. (A column grip drag intentionally takes width from only // one neighbour, which cannot expose this 82-column prefix.) Then click the // visible tail itself, at its `Term`. This proves the image tag is an ordinary // editor rather than accidentally typing at a clipped read-only path. diff --git a/test/process/tty_layout.zig b/test/process/tty_layout.zig index 84f76be7..08a02488 100644 --- a/test/process/tty_layout.zig +++ b/test/process/tty_layout.zig @@ -5,8 +5,6 @@ const Tty = @import("../tty.zig").Tty; pub const cases = .{ .{ "tty layout: colgrip", colgrip }, .{ "tty layout: collapse", collapse }, - .{ "tty layout: cornerdrag", cornerdrag }, - .{ "tty layout: cornerdrag-left", cornerdrag_left }, .{ "tty layout: delask", delask }, .{ "tty layout: emptycol", emptycol }, .{ "tty layout: layout-close", layout_close }, @@ -20,7 +18,7 @@ pub const cases = .{ }; // Column grips: the two cells left of a column tag carry the column. A grabbed -// grip lights, and a rail in its color stands where the column will land. +// grip lights. // The right column is at x 50; its grip is cells 51-52 (1-based) on row 2. fn colgrip(gpa: std.mem.Allocator, exe: [:0]const u8) !void { var t = try Tty.init(gpa, exe, "colgrip"); @@ -34,12 +32,11 @@ fn colgrip(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try t.key("a-c"); try t.stable(700, 15000); try t.style("rest"); - // held on its own grip: lit, and no rail, since it lands where it is + // held on its own grip: lit try t.press("left", "51", 2); try t.stable(400, 5000); try t.style("held"); - // dropped short of the left column's middle, the left edge moves: the rail is - // in the seam cell left of where the column's rule will be + // dropped short of the left column's middle, the left edge moves try t.drag("left", "41", 2); try t.stable(400, 5000); try t.snap("resize-drag"); @@ -47,8 +44,7 @@ fn colgrip(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try t.release("left", "41", 2); try t.stable(700, 15000); try t.snap("resize-done"); - // carried over the left column's left half it goes first; the window edge - // has no seam, so the rail runs in the gutter's last cell + // carried over the left column's left half it goes first try t.press("left", "41", 2); try t.drag("left", "10", 2); try t.stable(400, 5000); @@ -107,109 +103,6 @@ fn collapse(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try t.done(); } -// corner grabs: where a column edge crosses a pane edge, ONE drag moves both. -// Only the left column's h-splits make a corner — the v handle IS that column's -// last cell, so that is the only pane pair whose horizontal hint runs through -// it, and a corner therefore sits exactly where the two lines visibly cross. -// The layout is windowops': col 0 (x 0, w 50) holds panes 0 (rows 1-15) and 1 -// (rows 16-29), col 1 holds one pane. The corner is col 49, row 15. -fn cornerdrag(gpa: std.mem.Allocator, exe: [:0]const u8) !void { - var t = try Tty.init(gpa, exe, "cornerdrag"); - defer t.deinit(); - try t.file("w.txt", "x"); - try t.start(31, 100, &.{ "-n", "3" }); - try t.wait(8000, "w.txt"); - try t.stable(700, 20000); - // hover the corner: no hints (columns resize by their grips); the frame - // stays empty - try t.motion("50", 16); - try t.stable(400, 5000); - try t.snap("hover-corner"); - // CONTROL: the same vertical edge ten rows off the crossing is a plain edge. - // The identical diagonal drag moves the column and nothing else — pane 0 still - // ends on row 15, and the preview is one dash, not two - try t.press("left", "50", 7); - try t.drag("left", "30", 25); - try t.stable(400, 5000); - try t.snap("edge-drag"); - try t.release("left", "30", 25); - try t.motion("45", 25); - try t.stable(500, 8000); - try t.snap("edge-done"); - // the corner itself, now at col 0's new last col (29) and still row 15: drag it - // up and to the right and both boundaries follow the one mouse - try t.press("left", "30", 17); - try t.drag("left", "60", 9); - try t.stable(400, 5000); - try t.snap("corner-drag"); - try t.release("left", "60", 9); - try t.motion("45", 25); - try t.stable(500, 8000); - try t.snap("corner-done"); - // clamp interaction, half one: shove the corner off the right edge while - // staying mid-height. The column preview parks at its MINW stop; the row - // preview keeps tracking the mouse exactly - try t.press("left", "60", 9); - try t.drag("left", "99", 21); - try t.stable(400, 5000); - try t.snap("clamp-x"); - // half two, the mirror: below the bottom at mid-width. Now the ROW preview - // parks (the lower pane keeps its tag row) and the COLUMN keeps tracking - try t.drag("left", "60", 31); - try t.stable(400, 5000); - try t.snap("clamp-y"); - try t.release("left", "60", 31); - try t.motion("45", 25); - try t.stable(500, 8000); - try t.snap("clamp-done"); - try t.done(); -} - -// corner grabs on the RIGHT column's side of the v border. The v handle is the -// LEFT column's last cell, so that column's own h hint runs THROUGH it while the -// right column's hints start one cell further right — the crossing there reads as -// a T butting into the junction rather than a full cross, and it is grabbable all -// the same: one drag moves the column edge and the RIGHT column's pane edge. -// Layout: windowops' -n 3 (col 0 x 0 w 50, panes on rows 1-15 and 16-29; col 1 -// x 50 w 50), then focus right and Alt-n so col 1 holds two panes as well, split -// at ITS own row. The two corners on col 49 are then row 16 (col 0's seam, the -// one that already worked) and row 5 (col 1's, the one this script is about). -fn cornerdrag_left(gpa: std.mem.Allocator, exe: [:0]const u8) !void { - var t = try Tty.init(gpa, exe, "cornerdrag-left"); - defer t.deinit(); - try t.file("w.txt", "x"); - try t.start(31, 100, &.{ "-n", "3" }); - try t.wait(8000, "w.txt"); - try t.stable(700, 20000); - // a second pane in the RIGHT column - try t.key("c-w l enter"); - try t.stable(400, 5000); - try t.key("a-n"); - try t.stable(700, 15000); - try t.snap("right-split"); - // hover col 1's corner: hovering draws no hints any more, so the frame is - // empty; the drags below still show their previews - try t.motion("50", 5); - try t.stable(400, 5000); - try t.snap("hover-corner"); - // CONTROL: col 0's own seam, hovered: no hint either - try t.motion("50", 16); - try t.stable(400, 5000); - try t.snap("hover-left-corner"); - // grab col 1's corner and drag down-left: the column preview and col 1's row - // preview both follow the one mouse, the row dashes lying to the RIGHT of the v - // line because they are the right column's - try t.press("left", "50", 6); - try t.drag("left", "30", 13); - try t.stable(400, 5000); - try t.snap("corner-drag"); - try t.release("left", "30", 13); - try t.motion("45", 25); - try t.stable(500, 8000); - try t.snap("corner-done"); - try t.done(); -} - // Del from the keyboard on a pane with open panes above AND below asks, on the // pane's notice band, which one takes its rows: k above, j below, anything else // keeps the pane. A click, and DelAbove/DelBelow (Del k / Del j), never ask. @@ -479,8 +372,8 @@ fn shrinktag(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try t.motion("40", 25); try t.stable(500, 8000); try t.snap("shrunk"); - // the shrunk pane's gutter box grabs a move: preview one into the right - // column, abort by releasing over the pane itself + // the shrunk pane's gutter box grabs a move: carried into the right column + // nothing shows until the release, aborted by releasing over the pane itself try t.press("left", "1", 3); try t.drag("left", "70", 9); try t.stable(400, 5000); @@ -576,10 +469,11 @@ fn tagalign2col(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try t.key("a-n"); try t.stable(700, 15000); try t.snap("aligned"); - // Resizing moves the right column as a whole and clips without hidden spaces. - try t.press("left", "80", 11); - try t.drag("left", "100", 11); - try t.release("left", "100", 11); + // Resizing by the right column's grip moves it as a whole and clips + // without hidden spaces. + try t.press("left", "81", 2); + try t.drag("left", "101", 2); + try t.release("left", "101", 2); try t.stable(700, 15000); try t.snap("widened"); try t.done(); @@ -665,7 +559,7 @@ fn windownav(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try t.done(); } -// hover (no hints), border drags, grip resize, move drag, Alt-n, Ctrl-w focus (window mode), Debug box +// hover (no hints), grip resize, move drag, Alt-n, Ctrl-w focus (window mode), Debug box fn windowops(gpa: std.mem.Allocator, exe: [:0]const u8) !void { var t = try Tty.init(gpa, exe, "windowops"); defer t.deinit(); @@ -681,14 +575,6 @@ fn windowops(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try t.motion("20", 16); try t.stable(400, 5000); try t.snap("hover-h"); - // drag the vertical border 10 cols left - try t.press("left", "50", 11); - try t.drag("left", "40", 11); - try t.stable(400, 5000); - try t.snap("border-drag"); - try t.release("left", "40", 11); - try t.stable(500, 8000); - try t.snap("border-done"); // resize the left pair by the lower pane's grip, 4 rows up (a terminal has no // rule between panes; pane 0's last row is now 13) try t.press("left", "1", 18); @@ -696,7 +582,8 @@ fn windowops(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try t.release("left", "1", 14); try t.stable(500, 8000); try t.snap("hborder-done"); - // move pane 1 (its gutter box) into the right column + // move pane 1 (its gutter box) into the right column: nothing shows until + // the release try t.press("left", "1", 18); try t.drag("left", "70", 9); try t.stable(400, 5000); diff --git a/test/snapshots/colgrip.golden b/test/snapshots/colgrip.golden index a76642b1..a64be69c 100644 --- a/test/snapshots/colgrip.golden +++ b/test/snapshots/colgrip.golden @@ -27,143 +27,46 @@ |1: 0-1 d,#887455, 2-49 #b2c3b8,#1d2824, 50-51 #b2c3b8,#f4c086, 52-99 #becfc4,#314738, == snap resize-drag grid=100x24 cursor=54,6 | Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit -| New Term Find Grep Joincol Delcol ╎ New Term Find Grep Joincol Delcol -| /tmp/pardes-snap/colgrip/cwd/w.txt Sa╎e Term Col /tmp/pardes-snap/colgrip/cwd Term+bash Save Mode -| lapse Follow Del ╎ Filter Collapse Del -| 1 x ╎ ls -| ╎ w.txt -| ╎ -| ╎ -| ╎ -| ╎ -| ╎ -| ╎ -| ╎ -| ╎ -| ╎ -| ╎ -| ╎ -| ╎ -| ╎ -| ╎ -| ╎ -| ╎ -| ╎ -| ╎ +| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol +| /tmp/pardes-snap/colgrip/cwd/w.txt Save Term Col /tmp/pardes-snap/colgrip/cwd Term+bash Save Mode +| lapse Follow Del Filter Collapse Del +| 1 x ls +| w.txt == style resize-drag grid=100x24 -|1: 0-1 d,#887455, 2-38 #b2c3b8,#1d2824, 39-49 #f4c086,#1d2824, 50-51 #f4c086,#f4c086, 52-99 #becfc4,#314738, -|2: 0-1 d,#496656, 2-30 #b2c3b8,#1d2824, 31-36 #d3b0d9,#1d2824, 37-38 #b2c3b8,#1d2824, 39-39 #f4c086,#1d2824, 40-49 #b2c3b8,#1d2824, 50-51 #b2c3b8,#add38a, 52-80 #becfc4,#314738, 81-90 #dfbce5,#314738, 91-99 #becfc4,#314738, -|3: 0-1 d,#1d2824, 2-38 #b2c3b8,#1d2824, 39-49 #f4c086,#1d2824, 50-52 #f4c086,#314738, 53-99 #becfc4,#314738, -|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-38 #e5eee5,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-51 #f4c086,#0d1410, 52-99 #e5eee5,#0d1410, -|5: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-51 #f4c086,#0d1410, 52-99 #e5eee5,#0d1410, -|6: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410, -|7: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410, -|8: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410, -|9: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410, -|10: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410, -|11: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410, -|12: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410, -|13: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410, -|14: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410, -|15: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410, -|16: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410, -|17: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410, -|18: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410, -|19: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410, -|20: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410, -|21: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410, -|22: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410, -|23: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410, == snap resize-done grid=100x24 cursor=44,6 |1: New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol |2: /tmp/pardes-snap/colgrip/cwd/w.txt Sav /tmp/pardes-snap/colgrip/cwd Term+bash Save Mode Filter Co |3: e Term Collapse Follow Del llapse Del |4: 1 x ls |5: w.txt -|6: -|7: -|8: -|9: -|10: -|11: -|12: -|13: -|14: -|15: -|16: -|17: -|18: -|19: -|20: -|21: -|22: -|23: == snap reorder-drag grid=100x24 cursor=44,6 -|4: ╎ 1 x ls -|5: ╎ w.txt -|6: ╎ -|7: ╎ -|8: ╎ -|9: ╎ -|10: ╎ -|11: ╎ -|12: ╎ -|13: ╎ -|14: ╎ -|15: ╎ -|16: ╎ -|17: ╎ -|18: ╎ -|19: ╎ -|20: ╎ -|21: ╎ -|22: ╎ -|23: ╎ == style reorder-drag grid=100x24 |1: 0-1 d,#887455, 2-39 #b2c3b8,#1d2824, 40-41 #b2c3b8,#f4c086, 42-99 #becfc4,#314738, |2: 0-1 d,#496656, 2-30 #b2c3b8,#1d2824, 31-36 #d3b0d9,#1d2824, 37-39 #b2c3b8,#1d2824, 40-41 #b2c3b8,#add38a, 42-70 #becfc4,#314738, 71-80 #dfbce5,#314738, 81-99 #becfc4,#314738, |3: 0-1 d,#1d2824, 2-39 #b2c3b8,#1d2824, 40-41 #b2c3b8,#314738, 42-99 #becfc4,#314738, -|4: 0-0 d,#608269, 1-4 #f4c086,#0d1410, 5-6 #59675c,#0d1410, 7-39 #e5eee5,#0d1410, 40-40 #e5eee5,#608269, 41-99 #e5eee5,#0d1410, -|5: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-41 #f4c086,#0d1410, 42-99 #e5eee5,#0d1410, -|6: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410, -|7: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410, -|8: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410, -|9: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410, -|10: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410, -|11: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410, -|12: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410, -|13: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410, -|14: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410, -|15: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410, -|16: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410, -|17: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410, -|18: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410, -|19: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410, -|20: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410, -|21: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410, -|22: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410, -|23: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410, +|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-39 #e5eee5,#0d1410, 40-40 #e5eee5,#608269, 41-99 #e5eee5,#0d1410, +|5: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410, +|6: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, +|7: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, +|8: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, +|9: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, +|10: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, +|11: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, +|12: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, +|13: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, +|14: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, +|15: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, +|16: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, +|17: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, +|18: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, +|19: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, +|20: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, +|21: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, +|22: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, +|23: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, == snap reorder-done grid=100x24 cursor=4,6 |1: New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol |2: /tmp/pardes-snap/colgrip/cwd Term+bash Save Mode Filter Co /tmp/pardes-snap/colgrip/cwd/w.txt Sav |3: llapse Del e Term Collapse Follow Del |4: ls 1 x |5: w.txt -|6: -|7: -|8: -|9: -|10: -|11: -|12: -|13: -|14: -|15: -|16: -|17: -|18: -|19: -|20: -|21: -|22: -|23: diff --git a/test/snapshots/cornerdrag-left.golden b/test/snapshots/cornerdrag-left.golden deleted file mode 100644 index d5c7b7fd..00000000 --- a/test/snapshots/cornerdrag-left.golden +++ /dev/null @@ -1,86 +0,0 @@ -== snap right-split grid=100x31 cursor=54,11 -| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit -| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol -| /tmp/pardes-snap/cornerdrag-left/cwd Term+bash S /tmp/pardes-snap/cornerdrag-left/cwd Term+bash S -| ave Mode Filter Collapse Del ave Mode Filter Collapse Del -| ls ls -| w.txt w.txt -| -| /tmp/pardes-snap/cornerdrag-left/cwd Term+bash S -| ave Mode Filter Collapse Del -| ls -| w.txt -| -| -| -| -| -| -| /tmp/pardes-snap/cornerdrag-left/cwd Term+bash S -| ave Mode Filter Collapse Del -| ls -| w.txt -== snap hover-corner grid=100x31 cursor=54,11 -== snap hover-left-corner grid=100x31 cursor=54,11 -== snap corner-drag grid=100x31 cursor=54,11 -|1: New Term Find Grep Joincol ╎elcol New Term Find Grep Joincol Delcol -|2: /tmp/pardes-snap/cornerdrag╎left/cwd Term+bash S /tmp/pardes-snap/cornerdrag-left/cwd Term+bash S -|3: ave Mode Filter Collapse De╎ ave Mode Filter Collapse Del -|4: ls ╎ ls -|5: w.txt ╎ w.txt -|6: ╎ -|7: ╎ /tmp/pardes-snap/cornerdrag-left/cwd Term+bash S -|8: ╎ ave Mode Filter Collapse Del -|9: ╎ ls -|10: ╎ w.txt -|11: ╎ -|12: ╎ -|13: ╎ -|14: ╎ -|15: ╎ -|16: ╎ -|17: /tmp/pardes-snap/cornerdrag╎left/cwd Term+bash S -|18: ave Mode Filter Collapse De╎ -|19: ls ╎ -|20: w.txt ╎ -|21: ╎ -|22: ╎ -|23: ╎ -|24: ╎ -|25: ╎ -|26: ╎ -|27: ╎ -|28: ╎ -|29: ╎ -|30: ╎ -== snap corner-done grid=100x31 cursor=34,11 -|1: New Term Find Grep Joincol D New Term Find Grep Joincol Delcol -|2: /tmp/pardes-snap/cornerdrag- /tmp/pardes-snap/cornerdrag-left/cwd Term+bash Save Mode Filter Coll -|3: left/cwd Term+bash Save Mode apse Del -|4: Filter Collapse Del ls -|5: ls w.txt -|6: w.txt -|7: /tmp/pardes-snap/cornerdrag-left/cwd Term+bash Save Mode Filter Coll -|8: apse Del -|9: ls -|10: w.txt -|11: -|12: -|13: -|14: -|15: -|16: -|17: /tmp/pardes-snap/cornerdrag- -|18: left/cwd Term+bash Save Mode -|19: Filter Collapse Del -|20: ls -|21: w.txt -|22: -|23: -|24: -|25: -|26: -|27: -|28: -|29: -|30: diff --git a/test/snapshots/cornerdrag.golden b/test/snapshots/cornerdrag.golden deleted file mode 100644 index bd552949..00000000 --- a/test/snapshots/cornerdrag.golden +++ /dev/null @@ -1,239 +0,0 @@ -== snap hover-corner grid=100x31 cursor=4,6 -| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit -| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol -| /tmp/pardes-snap/cornerdrag/cwd Term+bash Save M /tmp/pardes-snap/cornerdrag/cwd Term+bash Save M -| ode Filter Collapse Del ode Filter Collapse Del -| ls ls -| w.txt w.txt -| -| -| -| -| -| -| -| -| -| -| -| /tmp/pardes-snap/cornerdrag/cwd Term+bash Save M -| ode Filter Collapse Del -| ls -| w.txt -== snap edge-drag grid=100x31 cursor=4,6 -|1: New Term Find Grep Joincol ╎elcol New Term Find Grep Joincol Delcol -|2: /tmp/pardes-snap/cornerdrag╎cwd Term+bash Save M /tmp/pardes-snap/cornerdrag/cwd Term+bash Save M -|3: ode Filter Collapse Del ╎ ode Filter Collapse Del -|4: ls ╎ ls -|5: w.txt ╎ w.txt -|6: ╎ -|7: ╎ -|8: ╎ -|9: ╎ -|10: ╎ -|11: ╎ -|12: ╎ -|13: ╎ -|14: ╎ -|15: ╎ -|16: ╎ -|17: /tmp/pardes-snap/cornerdrag╎cwd Term+bash Save M -|18: ode Filter Collapse Del ╎ -|19: ls ╎ -|20: w.txt ╎ -|21: ╎ -|22: ╎ -|23: ╎ -|24: ╎ -|25: ╎ -|26: ╎ -|27: ╎ -|28: ╎ -|29: ╎ -|30: ╎ -== snap edge-done grid=100x31 cursor=4,7 -|1: New Term Find Grep Joincol D New Term Find Grep Joincol Delcol -|2: /tmp/pardes-snap/cornerdrag/ /tmp/pardes-snap/cornerdrag/cwd Term+bash Save Mode Filter Collapse -|3: cwd Term+bash Save Mode Filt Del -|4: er Collapse Del ls -|5: ls w.txt -|6: w.txt -|7: -|8: -|9: -|10: -|11: -|12: -|13: -|14: -|15: -|16: -|17: /tmp/pardes-snap/cornerdrag/ -|18: cwd Term+bash Save Mode Filt -|19: er Collapse Del -|20: ls -|21: w.txt -|22: -|23: -|24: -|25: -|26: -|27: -|28: -|29: -|30: -== snap corner-drag grid=100x31 cursor=4,7 -|1: New Term Find Grep Joincol D New Term Find Grep Joincol ╎elcol -|2: /tmp/pardes-snap/cornerdrag/ /tmp/pardes-snap/cornerdrag╎cwd Term+bash Save Mode Filter Collapse -|3: cwd Term+bash Save Mode Filt Del ╎ -|4: er Collapse Del ls ╎ -|5: ls w.txt ╎ -|6: w.txt ╎ -|7: ╎ -|8: ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ -|9: ╎ -|10: ╎ -|11: ╎ -|12: ╎ -|13: ╎ -|14: ╎ -|15: ╎ -|16: ╎ -|17: /tmp/pardes-snap/cornerdrag/ ╎ -|18: cwd Term+bash Save Mode Filt ╎ -|19: er Collapse Del ╎ -|20: ls ╎ -|21: w.txt ╎ -|22: ╎ -|23: ╎ -|24: ╎ -|25: ╎ -|26: ╎ -|27: ╎ -|28: ╎ -|29: ╎ -|30: ╎ -== snap corner-done grid=100x31 cursor=4,6 -|1: New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol -|2: /tmp/pardes-snap/cornerdrag/cwd Term+bash Save Mode Filter /tmp/pardes-snap/cornerdrag/cwd Term+b -|3: Collapse Del ash Save Mode Filter Collapse Del -|4: ls ls -|5: w.txt w.txt -|6: -|7: -|8: -|9: /tmp/pardes-snap/cornerdrag/cwd Term+bash Save Mode Filter -|10: Collapse Del -|11: ls -|12: w.txt -|13: -|14: -|15: -|16: -|17: -|18: -|19: -|20: -|21: -|22: -|23: -|24: -|25: -|26: -|27: -|28: -|29: -|30: -== snap clamp-x grid=100x31 cursor=4,6 -|1: New Term Find Grep Joincol Delcol New Term Find Grep Joincol D╎lcol -|2: /tmp/pardes-snap/cornerdrag/cwd Term+bash Save Mode Filter /tmp/pardes-snap/cornerdrag/╎wd Term+b -|3: Collapse Del ash Save Mode Filter Collaps╎ Del -|4: ls ls ╎ -|5: w.txt w.txt ╎ -|6: ╎ -|7: ╎ -|8: ╎ -|9: /tmp/pardes-snap/cornerdrag/cwd Term+bash Save Mode Filter ╎ -|10: Collapse Del ╎ -|11: ls ╎ -|12: w.txt ╎ -|13: ╎ -|14: ╎ -|15: ╎ -|16: ╎ -|17: ╎ -|18: ╎ -|19: ╎ -|20: ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ -|21: ╎ -|22: ╎ -|23: ╎ -|24: ╎ -|25: ╎ -|26: ╎ -|27: ╎ -|28: ╎ -|29: ╎ -|30: ╎ -== snap clamp-y grid=100x31 cursor=4,6 -|1: New Term Find Grep Joincol Delcol ╎ New Term Find Grep Joincol Delcol -|2: /tmp/pardes-snap/cornerdrag/cwd Term+bash Save Mode Filte╎ /tmp/pardes-snap/cornerdrag/cwd Term+b -|3: Collapse Del ╎ ash Save Mode Filter Collapse Del -|4: ls ╎ ls -|5: w.txt ╎ w.txt -|6: ╎ -|7: ╎ -|8: ╎ -|9: /tmp/pardes-snap/cornerdrag/cwd Term+bash Save Mode Filte╎ -|10: Collapse Del ╎ -|11: ls ╎ -|12: w.txt ╎ -|13: ╎ -|14: ╎ -|15: ╎ -|16: ╎ -|17: ╎ -|18: ╎ -|19: ╎ -|20: ╎ -|21: ╎ -|22: ╎ -|23: ╎ -|24: ╎ -|25: ╎ -|26: ╎ -|27: ╎ -|28: ╎ -|29: ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ -|30: ╎ -== snap clamp-done grid=100x31 cursor=4,6 -|1: New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol -|2: /tmp/pardes-snap/cornerdrag/cwd Term+bash Save Mode Filter /tmp/pardes-snap/cornerdrag/cwd Term+b -|3: Collapse Del ash Save Mode Filter Collapse Del -|4: ls ls -|5: w.txt w.txt -|6: -|7: -|8: -|9: -|10: -|11: -|12: -|13: -|14: -|15: -|16: -|17: -|18: -|19: -|20: -|21: -|22: -|23: -|24: -|25: -|26: -|27: /tmp/pardes-snap/cornerdrag/cwd Term+bash Save Mode Filter -|28: Collapse Del -|29: w.txt -|30: diff --git a/test/snapshots/shrinktag.golden b/test/snapshots/shrinktag.golden index d2167e86..bfca20e3 100644 --- a/test/snapshots/shrinktag.golden +++ b/test/snapshots/shrinktag.golden @@ -32,7 +32,6 @@ |19: |20: == snap move-preview grid=100x31 cursor=4,9 -|8: ls ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌▌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ == snap restored grid=100x31 cursor=4,9 |4: ls ls |5: w.txt w.txt diff --git a/test/snapshots/windowops.golden b/test/snapshots/windowops.golden index 6d27586b..ab97a868 100644 --- a/test/snapshots/windowops.golden +++ b/test/snapshots/windowops.golden @@ -21,71 +21,9 @@ | ls | w.txt == snap hover-h grid=100x31 cursor=4,6 -== snap border-drag grid=100x31 cursor=4,6 -|1: New Term Find Grep Joincol Delcol ╎ New Term Find Grep Joincol Delcol -|2: /tmp/pardes-snap/windowops/cwd Term+b╎sh Save Mo /tmp/pardes-snap/windowops/cwd Term+bash Save Mo -|3: de Filter Collapse Del ╎ de Filter Collapse Del -|4: ls ╎ ls -|5: w.txt ╎ w.txt -|6: ╎ -|7: ╎ -|8: ╎ -|9: ╎ -|10: ╎ -|11: ╎ -|12: ╎ -|13: ╎ -|14: ╎ -|15: ╎ -|16: ╎ -|17: /tmp/pardes-snap/windowops/cwd Term+b╎sh Save Mo -|18: de Filter Collapse Del ╎ -|19: ls ╎ -|20: w.txt ╎ -|21: ╎ -|22: ╎ -|23: ╎ -|24: ╎ -|25: ╎ -|26: ╎ -|27: ╎ -|28: ╎ -|29: ╎ -|30: ╎ -== snap border-done grid=100x31 cursor=4,6 -|1: New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol -|2: /tmp/pardes-snap/windowops/cwd Term+ba /tmp/pardes-snap/windowops/cwd Term+bash Save Mode Filter -|3: sh Save Mode Filter Collapse Del Collapse Del -|4: ls ls -|5: w.txt w.txt -|6: -|7: -|8: -|9: -|10: -|11: -|12: -|13: -|14: -|15: -|16: -|17: /tmp/pardes-snap/windowops/cwd Term+ba -|18: sh Save Mode Filter Collapse Del -|19: ls -|20: w.txt -|21: -|22: -|23: -|24: -|25: -|26: -|27: -|28: -|29: -|30: == snap hborder-done grid=100x31 cursor=4,6 -|13: /tmp/pardes-snap/windowops/cwd Term+ba -|14: sh Save Mode Filter Collapse Del +|13: /tmp/pardes-snap/windowops/cwd Term+bash Save Mo +|14: de Filter Collapse Del |15: ls |16: w.txt |17: @@ -95,63 +33,63 @@ == snap move-preview grid=100x31 cursor=4,17 == snap moved grid=100x31 cursor=4,17 == snap altn grid=100x31 cursor=4,22 -|18: /tmp/pardes-snap/windowops/cwd Term+ba -|19: sh Save Mode Filter Collapse Del +|18: /tmp/pardes-snap/windowops/cwd Term+bash Save Mo +|19: de Filter Collapse Del |20: ls |21: w.txt -== snap focus-right grid=100x31 cursor=44,6 -== snap debug-on grid=100x31 cursor=44,6 -|1: New Term Find Grep Joincol Delcol New Term Find Grep J╭────────────────────────────────────╮ -|2: /tmp/pardes-snap/windowops/cwd Term+ba /tmp/pardes-snap/win│pardes resizes=1 │ -|3: sh Save Mode Filter Collapse Del Collapse Del │theme orchard │ -|4: ls ls │font default │ -|5: w.txt w.txt │terms 4 cols 2 │ -|6: │active #2 58x27 │ +== snap focus-right grid=100x31 cursor=54,6 +== snap debug-on grid=100x31 cursor=54,6 +|1: New Term Find Grep Joincol Delcol New Term F╭────────────────────────────────────╮ +|2: /tmp/pardes-snap/windowops/cwd Term+bash Save Mo /tmp/parde│pardes resizes=1 │ +|3: de Filter Collapse Del de Filter │theme orchard │ +|4: ls ls │font default │ +|5: w.txt w.txt │terms 4 cols 2 │ +|6: │active #2 48x27 │ |7: │scroll 0/27 │ |8: │frame virtual clock │ |9: │ │ |10: │ │ |11: │ │ |12: │ │ -|13: /tmp/pardes-snap/windowops/cwd Term+ba ╰────────────────────────────────────╯ +|13: /tmp/pardes-snap/windowops/cwd Term+bash Save Mo ╰────────────────────────────────────╯ == style debug-on grid=100x31 |0: 0-1 d,#1d2824, 2-74 #b2c3b8,#1d2824, 75-79 #f5f7ee,#3c614a, 80-80 #f5f7ee,#1d2824, 81-99 #b2c3b8,#1d2824, -|1: 0-1 d,#887455, 2-39 #b2c3b8,#1d2824, 40-41 #b2c3b8,#887455, 42-61 #becfc4,#314738, 62-99 d,d, -|2: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-39 #d3b0d9,#1d2824, 40-41 #d3b0d9,#add38a, 42-61 #becfc4,#314738, 62-62 d,d, 63-79 #b2c3b8,d, 80-98 #b2c3b8,#152019, 99-99 d,d, -|3: 0-1 d,#1d2824, 2-4 #d3b0d9,#1d2824, 5-39 #b2c3b8,#1d2824, 40-41 #b2c3b8,#314738, 42-61 #becfc4,#314738, 62-62 d,d, 63-76 #b2c3b8,d, 77-98 #b2c3b8,#152019, 99-99 d,d, -|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 #e5eee5,#608269, 41-61 #e5eee5,#0d1410, 62-62 d,d, 63-76 #b2c3b8,d, 77-98 #b2c3b8,#152019, 99-99 d,d, -|5: 0-0 d,#608269, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 #e5eee5,#608269, 41-61 #e5eee5,#0d1410, 62-62 d,d, 63-77 #b2c3b8,d, 78-98 #b2c3b8,#152019, 99-99 d,d, -|6: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-61 d,#0d1410, 62-62 d,d, 63-78 #b2c3b8,d, 79-98 #b2c3b8,#152019, 99-99 d,d, -|7: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-61 d,#0d1410, 62-62 d,d, 63-73 #b2c3b8,d, 74-98 #b2c3b8,#152019, 99-99 d,d, -|8: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-61 d,#0d1410, 62-62 d,d, 63-82 #b2c3b8,d, 83-98 #b2c3b8,#152019, 99-99 d,d, -|9: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-61 d,#0d1410, 62-62 d,d, 63-98 d,#152019, 99-99 d,d, -|10: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-61 d,#0d1410, 62-62 d,d, 63-98 d,#152019, 99-99 d,d, -|11: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-61 d,#0d1410, 62-62 d,d, 63-98 d,#152019, 99-99 d,d, -|12: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-61 d,#0d1410, 62-62 d,d, 63-98 d,#152019, 99-99 d,d, -|13: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-39 #d3b0d9,#1d2824, 40-40 #d3b0d9,#608269, 41-61 #d3b0d9,#0d1410, 62-99 d,d, -|14: 0-1 d,#1d2824, 2-4 #d3b0d9,#1d2824, 5-39 #b2c3b8,#1d2824, 40-40 #b2c3b8,#608269, 41-99 #b2c3b8,#0d1410, -|15: 0-0 d,#608269, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 #e5eee5,#608269, 41-99 #e5eee5,#0d1410, -|16: 0-0 d,#608269, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 #e5eee5,#608269, 41-99 #e5eee5,#0d1410, -|17: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, -|18: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-39 #d3b0d9,#1d2824, 40-40 #d3b0d9,#608269, 41-99 #d3b0d9,#0d1410, -|19: 0-1 d,#1d2824, 2-4 #d3b0d9,#1d2824, 5-39 #b2c3b8,#1d2824, 40-40 #b2c3b8,#608269, 41-99 #b2c3b8,#0d1410, -|20: 0-0 d,#608269, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 #e5eee5,#608269, 41-99 #e5eee5,#0d1410, -|21: 0-0 d,#608269, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 #e5eee5,#608269, 41-99 #e5eee5,#0d1410, -|22: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, -|23: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, -|24: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, -|25: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, -|26: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, -|27: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, -|28: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, -|29: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, -|30: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, -== snap debug-off grid=100x31 cursor=44,6 -|1: New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol -|2: /tmp/pardes-snap/windowops/cwd Term+ba /tmp/pardes-snap/windowops/cwd Term+bash Save Mode Filter -|3: sh Save Mode Filter Collapse Del Collapse Del -|4: ls ls Debug -|5: w.txt w.txt +|1: 0-1 d,#887455, 2-49 #b2c3b8,#1d2824, 50-51 #b2c3b8,#887455, 52-61 #becfc4,#314738, 62-99 d,d, +|2: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-42 #d3b0d9,#1d2824, 43-49 #b2c3b8,#1d2824, 50-51 #b2c3b8,#add38a, 52-61 #becfc4,#314738, 62-62 d,d, 63-79 #b2c3b8,d, 80-98 #b2c3b8,#152019, 99-99 d,d, +|3: 0-1 d,#1d2824, 2-49 #b2c3b8,#1d2824, 50-51 #b2c3b8,#314738, 52-61 #becfc4,#314738, 62-62 d,d, 63-76 #b2c3b8,d, 77-98 #b2c3b8,#152019, 99-99 d,d, +|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-61 #e5eee5,#0d1410, 62-62 d,d, 63-76 #b2c3b8,d, 77-98 #b2c3b8,#152019, 99-99 d,d, +|5: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-61 #e5eee5,#0d1410, 62-62 d,d, 63-77 #b2c3b8,d, 78-98 #b2c3b8,#152019, 99-99 d,d, +|6: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-61 d,#0d1410, 62-62 d,d, 63-78 #b2c3b8,d, 79-98 #b2c3b8,#152019, 99-99 d,d, +|7: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-61 d,#0d1410, 62-62 d,d, 63-73 #b2c3b8,d, 74-98 #b2c3b8,#152019, 99-99 d,d, +|8: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-61 d,#0d1410, 62-62 d,d, 63-82 #b2c3b8,d, 83-98 #b2c3b8,#152019, 99-99 d,d, +|9: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-61 d,#0d1410, 62-62 d,d, 63-98 d,#152019, 99-99 d,d, +|10: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-61 d,#0d1410, 62-62 d,d, 63-98 d,#152019, 99-99 d,d, +|11: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-61 d,#0d1410, 62-62 d,d, 63-98 d,#152019, 99-99 d,d, +|12: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-61 d,#0d1410, 62-62 d,d, 63-98 d,#152019, 99-99 d,d, +|13: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-42 #d3b0d9,#1d2824, 43-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-61 #b2c3b8,#0d1410, 62-99 d,d, +|14: 0-1 d,#1d2824, 2-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410, +|15: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410, +|16: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410, +|17: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410, +|18: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-42 #d3b0d9,#1d2824, 43-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410, +|19: 0-1 d,#1d2824, 2-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410, +|20: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410, +|21: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410, +|22: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410, +|23: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410, +|24: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410, +|25: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410, +|26: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410, +|27: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410, +|28: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410, +|29: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410, +|30: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410, +== snap debug-off grid=100x31 cursor=54,6 +|1: New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol +|2: /tmp/pardes-snap/windowops/cwd Term+bash Save Mo /tmp/pardes-snap/windowops/cwd Term+bash Save Mo +|3: de Filter Collapse Del de Filter Collapse Del +|4: ls ls Debug +|5: w.txt w.txt |6: |7: |8: @@ -159,4 +97,4 @@ |10: |11: |12: -|13: /tmp/pardes-snap/windowops/cwd Term+ba +|13: /tmp/pardes-snap/windowops/cwd Term+bash Save Mo |
