diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-07-28 12:10:22 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-07-28 13:21:50 +0200 |
| commit | b366f55f29af3775c055115572dd84873b1921e0 (patch) | |
| tree | b9c6a710997272d8b84238965e6f992abfbed42c /view.h | |
| parent | a19159c506577a168655afcd961381dd1f995610 (diff) | |
| download | vis-b366f55f29af3775c055115572dd84873b1921e0.tar.gz vis-b366f55f29af3775c055115572dd84873b1921e0.tar.xz | |
vis: use multiple cursor/selection infrastructure
This commits introduces the following keybindings, in normal mode:
CTRL-N select word the cursor is currently over, switch to visual mode
CTRL-P remove least recently added cursor
ESC if a selection is active, clear it.
Otherwise dispose all but the primary cursor.
In visual mode:
CTRL-N create new cursor and select next word matching current selection
CTRL-X clear (skip) current selection, but select next matching word
CTRL-P remove least recently added cursor
Diffstat (limited to 'view.h')
| -rw-r--r-- | view.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -117,7 +117,10 @@ void view_cursor_to(View*, size_t pos); Cursor *view_cursors_new(View*); /* get number of active cursors */ int view_cursors_count(View*); -/* dispose an existing cursor */ +/* dispose an existing cursor with its associated selection (if any), + * not applicaple for the last existing cursor */ +void view_cursors_dispose(Cursor*); +/* dispose an existing cursor, no matter what */ void view_cursors_free(Cursor*); /* only keep the main cursor, release all others together with their * selections (if any) */ |
