aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-12-21 12:25:58 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-12-21 12:54:31 +0100
commit559ab349a05d5201b666eddb22d921c40b131bd5 (patch)
tree107c95f6ddc10bec2837ed452aa97410a572b9cc /main.c
parent0109dfc0d4e65751571a86aa91ae3c9947182ba0 (diff)
downloadvis-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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.c b/main.c
index c59261b..7462e1b 100644
--- a/main.c
+++ b/main.c
@@ -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",