aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
Diffstat (limited to 'vis.c')
-rw-r--r--vis.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/vis.c b/vis.c
index c0da6ac..aa37cb8 100644
--- a/vis.c
+++ b/vis.c
@@ -385,8 +385,10 @@ static TextObject *moves_linewise[] = {
};
/** functions to be called from keybindings */
-/* navigate jumplist either in forward (arg->i>0) or backward (arg->i<0) direction */
+/* navigate jump list either in forward (arg->i>0) or backward (arg->i<0) direction */
static void jumplist(const Arg *arg);
+/* navigate change list either in forward (arg->i>0) or backward (arg->i<0) direction */
+static void changelist(const Arg *arg);
static void macro_record(const Arg *arg);
static void macro_replay(const Arg *arg);
/* temporarily suspend the editor and return to the shell, type 'fg' to get back */
@@ -810,6 +812,16 @@ static void jumplist(const Arg *arg) {
window_cursor_to(vis->win->win, pos);
}
+static void changelist(const Arg *arg) {
+ size_t pos;
+ if (arg->i > 0)
+ pos = editor_window_changelist_next(vis->win);
+ else
+ pos = editor_window_changelist_prev(vis->win);
+ if (pos != EPOS)
+ window_cursor_to(vis->win->win, pos);
+}
+
static Macro *key2macro(const Arg *arg) {
if (arg->i)
return &vis->macros[arg->i];