Skip to content

Commit

Permalink
view: rename view_cursors_clear
Browse files Browse the repository at this point in the history
  • Loading branch information
martanne committed Jun 15, 2017
1 parent e00d142 commit 948efb8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion view.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion view.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion vis-prompt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 948efb8

Please sign in to comment.