summaryrefslogtreecommitdiff
path: root/src/Text.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-05 00:00:53 -0300
committerGabriel Schneider <[email protected]>2026-11-05 01:16:28 -0300
commitbbb4362a46de8e8d10a6a937e61ccc8f3a0ba4b3 (patch)
treee22e57bafd2bfcbba1bc0eda76b8dc6eecab0249 /src/Text.zig
parenta3e38a8fd01c54b1fab8a7eaf225ac6147c74330 (diff)
downloadpardes-bbb4362a46de8e8d10a6a937e61ccc8f3a0ba4b3.tar.gz
pardes-bbb4362a46de8e8d10a6a937e61ccc8f3a0ba4b3.zip
modal, normal, Text, config: goto_view_center goes: its chord list was empty (gc runs Callstack, its hx case waived), so the role, the Goto value, its arm and gotoWindow's center never ran; config.match_bracket, read by nothing, goes too; helix-keys.md's gt/gc/gb row says what gc is
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/Text.zig')
-rw-r--r--src/Text.zig5
1 files changed, 2 insertions, 3 deletions
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);