summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/helix-keys.md2
-rw-r--r--src/Text.zig5
-rw-r--r--src/config.zig3
-rw-r--r--src/modal.zig2
-rw-r--r--src/normal.zig1
5 files changed, 3 insertions, 10 deletions
diff --git a/docs/helix-keys.md b/docs/helix-keys.md
index b172caab..6c05e3ce 100644
--- a/docs/helix-keys.md
+++ b/docs/helix-keys.md
@@ -189,7 +189,7 @@ found. Pure text math in `modal.zig`: `findChar`, `matchBracket`,
| `gs` | goto first non-whitespace | alias of the `^` handler | helix-verified (phase 5) |
| `g.` | go to where the last edit ended (a deletion's start, an insertion's end), every range there, extending in select mode | helix `goto_last_modification`. The position is `Text.last_edit`, set by `edit.setEditText` from where the old and new texts part; helix's is the last history revision's, so with nothing edited yet pardes stays put where the harness's helix goes to the end of its setup text | helix-verified |
| `gw` | label the words in view (two word characters or more) with two letters each, nearest the cursor first, one forward and one back in turn; typing a label selects its word (stretching the selection to it in select mode), any other key takes the labels away | helix `goto_word`, alphabet a-z (`config.jump_label_alphabet`). The labels are painted over the body's cells in `body_layer.renderBody`, in the selection colours; the words live on `Pane.jump` | helix-verified |
-| `gt` / `gc` / `gb` | goto screen top / center / bottom | view-relative (`pane.scroll()` + `pane.rows`), column kept (clamped) | helix-verified (phase 5) |
+| `gt` / `gb` | goto screen top / bottom | view-relative (`pane.scroll()` + `pane.rows`), column kept (clamped). `gc` is not helix's goto-center here: it runs `Callstack` (waived, `gc-noscroll`) | helix-verified (phase 5) |
| `gj` / `gk` | VISUAL line down / up (+ count) | follows the wrapped body's own breaks (`file_pane.visualRow`, the same walk `fillBody` renders), keeping the goal column INSIDE the row; the last row of a line steps into the next line's first. Wrap off = one row per line, and this IS `j`/`k`. helix assigns the pair the other way round (its `j` is the visual one) | pardes-specific |
| `PageUp` / `PageDown` | FULL page (was half) | `Ctrl-u`/`Ctrl-d` stay the half-page pair | helix-verified (phase 5) |
diff --git a/src/Text.zig b/src/Text.zig
index 594307a8..1fbf8321 100644
--- a/src/Text.zig
+++ b/src/Text.zig
@@ -624,8 +624,8 @@ pub fn scrollViewMove(t: *Text, text: []const u8, range: modal.Selection, delta:
}
}
-/// gt/gc/gb: view-relative rows, col 0, scrolloff clamped (helix goto_window)
-pub fn gotoWindow(t: *Text, text: []const u8, range: modal.Selection, which: enum { top, center, bottom }, cnt: usize) void {
+/// gt/gb: view-relative rows, col 0, scrolloff clamped (helix goto_window)
+pub fn gotoWindow(t: *Text, text: []const u8, range: modal.Selection, which: enum { top, bottom }, cnt: usize) void {
// a view to move through is a body's; a tag or an answer is all shown
if (t.what != .body) return;
const w = t.pane() orelse return;
@@ -636,7 +636,6 @@ pub fn gotoWindow(t: *Text, text: []const u8, range: modal.Selection, which: enu
const n: i32 = @intCast(cnt - 1);
var vline: i32 = switch (which) {
.top => top + margin + n,
- .center => top + @divTrunc(last_vis, 2),
.bottom => top + last_vis - (margin + n),
};
vline = @max(vline, top + margin);
diff --git a/src/config.zig b/src/config.zig
index 49dd4f78..2542f99d 100644
--- a/src/config.zig
+++ b/src/config.zig
@@ -622,8 +622,6 @@ pub const goto_line_down: []const Chord = &.{.{ .cp = 'j' }};
pub const goto_line_up: []const Chord = &.{.{ .cp = 'k' }};
pub const goto_column: []const Chord = &.{.{ .cp = '|' }};
pub const goto_view_top: []const Chord = &.{.{ .cp = 't' }};
-// gc opens Callstack; it no longer moves the cursor to the viewport center.
-pub const goto_view_center: []const Chord = &.{};
pub const goto_view_bottom: []const Chord = &.{.{ .cp = 'b' }};
pub const goto_last_modification: []const Chord = &.{.{ .cp = '.' }};
pub const goto_word: []const Chord = &.{.{ .cp = 'w' }};
@@ -636,7 +634,6 @@ pub const goto_implementation: []const Chord = &.{.{ .cp = 'i' }};
pub const goto_references: []const Chord = &.{.{ .cp = 'r' }};
pub const goto_callstack: []const Chord = &.{.{ .cp = 'c' }};
-pub const match_bracket: []const Chord = &.{.{ .cp = 'm' }};
pub const match_inside = 'i';
pub const match_around = 'a';
pub const surround_add = 's';
diff --git a/src/modal.zig b/src/modal.zig
index 9ad30d13..a879b1dd 100644
--- a/src/modal.zig
+++ b/src/modal.zig
@@ -27,7 +27,6 @@ pub const Normal = struct {
goto_line_up,
goto_column,
goto_view_top,
- goto_view_center,
goto_view_bottom,
goto_last_modification,
goto_word,
@@ -268,7 +267,6 @@ pub const Normal = struct {
line_up,
column,
view_top,
- view_center,
view_bottom,
last_modification,
};
diff --git a/src/normal.zig b/src/normal.zig
index c7fc51a7..34f5ef58 100644
--- a/src/normal.zig
+++ b/src/normal.zig
@@ -661,7 +661,6 @@ fn executeNormalAction(p: *Pardes, t: *Text, semantic: modal.Normal.Action) void
return t.pointMove(text, range, ls + modal.graphemeAtColumn(slice, @as(usize, go.count) - 1));
},
.view_top => return t.gotoWindow(text, range, .top, go.count),
- .view_center => return t.gotoWindow(text, range, .center, go.count),
.view_bottom => return t.gotoWindow(text, range, .bottom, go.count),
.last_modification => {
const at = t.last_edit orelse return;