aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-06-12 18:10:05 +0200
committerMarc André Tanner <mat@brain-dump.org>2017-06-15 15:51:42 +0200
commit948efb8e624c4488db00ba20ab58652212a091d7 (patch)
tree5e7ff7a47afdb4aed89d4765cd60dcb5d5291afd
parente00d1426ead5742a91bf3bccae920509ff21acb0 (diff)
downloadvis-948efb8e624c4488db00ba20ab58652212a091d7.tar.gz
vis-948efb8e624c4488db00ba20ab58652212a091d7.tar.xz
view: rename view_cursors_clear
-rw-r--r--main.c2
-rw-r--r--view.c2
-rw-r--r--view.h2
-rw-r--r--vis-prompt.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/main.c b/main.c
index a42864e..5449d2b 100644
--- a/main.c
+++ b/main.c
@@ -1346,7 +1346,7 @@ static const char *cursors_align_indent(Vis *vis, const char *keys, const Arg *a
static const char *cursors_clear(Vis *vis, const char *keys, const Arg *arg) {
View *view = vis_view(vis);
if (view_cursors_count(view) > 1)
- view_cursors_clear(view);
+ view_selections_dispose_all(view);
else
view_cursors_selection_clear(view_cursors_primary_get(view));
return keys;
diff --git a/view.c b/view.c
index 49bb233..aeebe26 100644
--- a/view.c
+++ b/view.c
@@ -1188,7 +1188,7 @@ void view_selections_clear(View *view) {
view_draw(view);
}
-void view_cursors_clear(View *view) {
+void view_selections_dispose_all(View *view) {
for (Cursor *c = view->cursors, *next; c; c = next) {
next = c->next;
if (c != view->cursor)
diff --git a/view.h b/view.h
index c838ab9..670c41c 100644
--- a/view.h
+++ b/view.h
@@ -137,7 +137,7 @@ bool view_selections_dispose_force(Cursor*);
*/
Cursor *view_selection_disposed(View*);
/** Dispose all but the primary selection. */
-void view_cursors_clear(View*);
+void view_selections_dispose_all(View*);
/**
* @}
* @defgroup view_navigate
diff --git a/vis-prompt.c b/vis-prompt.c
index 7658d55..d2542ea 100644
--- a/vis-prompt.c
+++ b/vis-prompt.c
@@ -118,7 +118,7 @@ static const char *prompt_enter(Vis *vis, const char *keys, const Arg *arg) {
static const char *prompt_esc(Vis *vis, const char *keys, const Arg *arg) {
Win *prompt = vis->win;
if (view_cursors_count(prompt->view) > 1) {
- view_cursors_clear(prompt->view);
+ view_selections_dispose_all(prompt->view);
} else {
prompt_restore(prompt);
prompt_hide(prompt);