aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-11-19 23:38:23 +0100
committerMarc André Tanner <mat@brain-dump.org>2015-11-19 23:38:23 +0100
commit9bf0e704d094bfa9c82ddb45aa7797014832469e (patch)
tree75381cfbf8bd027eef90b62a84bd8175e3eb0fc0
parent7165cbcb182515e26b6d1b7beef46ce5abde04aa (diff)
downloadvis-9bf0e704d094bfa9c82ddb45aa7797014832469e.tar.gz
vis-9bf0e704d094bfa9c82ddb45aa7797014832469e.tar.xz
vis: improve <C-p> in visual mode
Make sure that the (new) primary cursor is visible after removing the last matched selection.
-rw-r--r--main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main.c b/main.c
index fc3877a..233b763 100644
--- a/main.c
+++ b/main.c
@@ -1188,6 +1188,7 @@ static const char *cursors_select_skip(Vis *vis, const char *keys, const Arg *ar
static const char *cursors_remove(Vis *vis, const char *keys, const Arg *arg) {
View *view = vis_view(vis);
view_cursors_dispose(view_cursor(view));
+ view_cursor_to(view, view_cursor_get(view));
return keys;
}