diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-01-06 21:28:39 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-01-06 22:15:55 +0100 |
| commit | d3b3e218edcaa950477645a9add92c83cd0543b9 (patch) | |
| tree | 0362222761e8770b241ba4d1ced8dd144bbcfaa9 /vis.c | |
| parent | 876b8f94649c9ec405375cf687b55a65e2e666ec (diff) | |
| download | vis-d3b3e218edcaa950477645a9add92c83cd0543b9.tar.gz vis-d3b3e218edcaa950477645a9add92c83cd0543b9.tar.xz | |
Rudimentary change list (accessible via g; and g,)
Diffstat (limited to 'vis.c')
| -rw-r--r-- | vis.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -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]; |
