summaryrefslogtreecommitdiff
path: root/core/normal.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/normal.zig')
-rw-r--r--core/normal.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/normal.zig b/core/normal.zig
index 982ab656..bb7824b2 100644
--- a/core/normal.zig
+++ b/core/normal.zig
@@ -1024,7 +1024,7 @@ fn shrinkSelToLineBounds(tab: u16, t: *Text, text: []const u8, range: modal.Sele
pub fn textRole(role: modal.Normal.Role, tree: bool) bool {
return switch (role) {
.all_children, .all_siblings, .expand_node, .goto_class, .goto_comment, .goto_entry, .goto_function, .goto_parameter, .goto_test, .goto_xml_element, .next_sibling, .parent_node_end, .parent_node_start, .prev_sibling, .shrink_node => tree,
- .append_output, .command_line, .format, .goto_callstack, .goto_declaration, .goto_definition, .goto_diagnostic, .goto_diagnostic_end, .goto_implementation, .goto_references, .goto_type_definition, .goto_view_bottom, .goto_view_top, .goto_word, .half_page_down, .half_page_up, .insert_output, .keep_pipe, .keep_regex, .leader, .macro_record, .macro_replay, .page_down, .page_up, .pipe_selection, .pipe_selection_to, .remove_regex, .repeat_insert, .search, .search_next, .search_prev, .select_regex, .split_regex, .view_bottom, .view_center, .view_middle, .view_scroll_down, .view_scroll_up, .view_top => false,
+ .append_output, .command_line, .format, .goto_callstack, .goto_change, .goto_declaration, .goto_definition, .goto_diagnostic, .goto_diagnostic_end, .goto_implementation, .goto_references, .goto_type_definition, .goto_view_bottom, .goto_view_top, .goto_word, .half_page_down, .half_page_up, .insert_output, .keep_pipe, .keep_regex, .leader, .macro_record, .macro_replay, .page_down, .page_up, .pipe_selection, .pipe_selection_to, .remove_regex, .repeat_insert, .search, .search_next, .search_prev, .select_regex, .split_regex, .view_bottom, .view_center, .view_middle, .view_scroll_down, .view_scroll_up, .view_top => false,
else => true,
};
}
@@ -1250,6 +1250,9 @@ fn executeNormalAction(p: *Pardes, t: *Text, a: modal.Normal.Action) edit.Error!
},
.view_scroll_down => if (t.what == .body) return t.scrollViewMove(p.settings.tab, text, range, 1),
.view_scroll_up => if (t.what == .body) return t.scrollViewMove(p.settings.tab, text, range, -1),
+ // The next and the previous of the changes this view shows (jj.zig).
+ .goto_change => if (@import("jj.zig").nextChange(p, pane, @intCast(@max(0, t.cur_row)), a.forward)) |line|
+ return pointMove(p.settings.tab, t, text, range, modal.lineStartOffset(text, line)),
.goto_diagnostic, .goto_diagnostic_end => {
// Once a Diagnostics query fed them, the diagnostics are this
// text's places: ]d and [d step them as n and N do, ]D and [D