summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 16:46:46 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:15 -0300
commitec4f300060ec0c93cc920dd5562eae1e3153d8b7 (patch)
tree1a5da619f2e607c0805ce7f04eacb18ffe6d72f6 /src/pardes.zig
parent71c5b400ced873cddd77497b7a9fd06184954813 (diff)
downloadpardes-ec4f300060ec0c93cc920dd5562eae1e3153d8b7.tar.gz
pardes-ec4f300060ec0c93cc920dd5562eae1e3153d8b7.zip
gw labels the words in view and jumps to the one whose label is typed
helix goto_word: the words of two or more word characters between the view's first and last lines get two-letter labels, nearest the cursor first, one forward and one back in turn (modal.jumpWords). The next two keys choose one and select it, stretching the selection to it in select mode; any other key takes the labels away. The words live on Pane.jump, and renderBody paints their labels over the body's cells in the selection colours, the one change on the render side. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index d43b38b1..6b397017 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -4395,6 +4395,7 @@ pub const Pardes = struct {
pane.body.deinit(p.gpa);
pane.tag.deinit(p.gpa);
pane.input.deinit(p.gpa);
+ pane.jump.deinit(p.gpa);
panes.Terminal.deinitEmulator(pane, p.gpa);
pane.clearCwd();
pane.fs.deinit(p.gpa);
@@ -5284,6 +5285,7 @@ pub const Pardes = struct {
if (normal.selRegexArmed(pane)) |a| if (p.promptTarget(pane)) |answered| normal.applySelRegex(p, pane, answered, a.pat, a.mode);
return;
}
+ if (t == &pane.body and pane.jump.items.len > 0) return normal.jumpKey(p, pane, t, key);
if (t.mode == .normal and p.macro.replaying == 0 and (hit(key, config.look_key) or hit(key, config.exec_key))) {
// A header's words are the workspace's and column's commands, so
// Enter runs them there, as the execute key does.