diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-12-21 12:25:58 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-12-21 12:54:31 +0100 |
| commit | 559ab349a05d5201b666eddb22d921c40b131bd5 (patch) | |
| tree | 107c95f6ddc10bec2837ed452aa97410a572b9cc /main.c | |
| parent | 0109dfc0d4e65751571a86aa91ae3c9947182ba0 (diff) | |
| download | vis-559ab349a05d5201b666eddb22d921c40b131bd5.tar.gz vis-559ab349a05d5201b666eddb22d921c40b131bd5.tar.xz | |
vis: implement `go` to move to absolute byte position
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -160,6 +160,7 @@ enum { VIS_ACTION_CURSOR_SCREEN_LINE_MIDDLE, VIS_ACTION_CURSOR_SCREEN_LINE_END, VIS_ACTION_CURSOR_PERCENT, + VIS_ACTION_CURSOR_BYTE, VIS_ACTION_CURSOR_PARAGRAPH_PREV, VIS_ACTION_CURSOR_PARAGRAPH_NEXT, VIS_ACTION_CURSOR_SENTENCE_PREV, @@ -451,6 +452,11 @@ static const KeyAction vis_action[] = { "Move to count % of file or matching item", percent }, + [VIS_ACTION_CURSOR_BYTE] = { + "cursor-byte", + "Move to absolute byte position", + movement, { .i = VIS_MOVE_BYTE } + }, [VIS_ACTION_CURSOR_PARAGRAPH_PREV] = { "cursor-paragraph-prev", "Move cursor paragraph backward", |
