diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-10-25 21:49:01 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-10-25 22:46:43 +0100 |
| commit | 3eda85a13268a7ceeb97d2e6666f0c5e6e5942d4 (patch) | |
| tree | 3a25fbfdce1b1609a448d8be8df0c5dd644ed326 | |
| parent | afe666ee88c7706954d6d6bea70ac18ecfd20312 (diff) | |
| download | vis-3eda85a13268a7ceeb97d2e6666f0c5e6e5942d4.tar.gz vis-3eda85a13268a7ceeb97d2e6666f0c5e6e5942d4.tar.xz | |
vis: introduce vis_motion_type API
| -rw-r--r-- | vis.c | 6 | ||||
| -rw-r--r-- | vis.h | 7 |
2 files changed, 12 insertions, 1 deletions
@@ -908,7 +908,7 @@ static const char *gotoline(Vis *vis, const char *keys, const Arg *arg) { } static const char *motiontype(Vis *vis, const char *keys, const Arg *arg) { - vis->action.type = arg->i; + vis_motion_type(vis, arg->i); return keys; } @@ -2888,3 +2888,7 @@ void vis_mark_set(Vis *vis, enum VisMark mark, size_t pos) { if (mark < LENGTH(file->marks)) file->marks[mark] = text_mark_set(file->text, pos); } + +void vis_motion_type(Vis *vis, enum VisMotionType type) { + vis->action.type = type; +} @@ -110,6 +110,13 @@ enum VisMotion { void vis_motion(Vis*, enum VisMotion, ...); +enum VisMotionType { + VIS_MOTION_LINEWISE = 1 << 0, + VIS_MOTION_CHARWISE = 1 << 1, +}; + +void vis_motion_type(Vis *vis, enum VisMotionType); + enum VisTextObject { TEXT_OBJ_INNER_WORD, TEXT_OBJ_OUTER_WORD, |
