Skip to content

Commit

Permalink
view: rename view_selections_clear
Browse files Browse the repository at this point in the history
  • Loading branch information
martanne committed Jun 15, 2017
1 parent 0b3107d commit c4b4eeb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions view.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ void view_free(View *view) {

void view_reload(View *view, Text *text) {
view->text = text;
view_selections_clear(view);
view_selections_clear_all(view);
view_cursor_to(view, 0);
}

Expand Down Expand Up @@ -1182,7 +1182,7 @@ bool view_selection_anchored(Selection *s) {
return s->anchored;
}

void view_selections_clear(View *view) {
void view_selections_clear_all(View *view) {
for (Cursor *c = view->cursors; c; c = c->next)
view_cursors_selection_clear(c);
view_draw(view);
Expand Down
2 changes: 1 addition & 1 deletion view.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ void view_selections_set(Cursor*, const Filerange*);
*/
void view_cursors_selection_clear(Cursor*);
/** Reduce *all* currently active selections. */
void view_selections_clear(View*);
void view_selections_clear_all(View*);
/**
* Flip selection orientation. Swap cursor and anchor.
* @rst
Expand Down
4 changes: 2 additions & 2 deletions vis-modes.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ static void vis_mode_visual_line_enter(Vis *vis, Mode *old) {
static void vis_mode_visual_line_leave(Vis *vis, Mode *new) {
if (!new->visual) {
window_selection_save(vis->win);
view_selections_clear(vis->win->view);
view_selections_clear_all(vis->win->view);
} else {
view_cursor_to(vis->win->view, view_cursor_get(vis->win->view));
}
Expand All @@ -211,7 +211,7 @@ static void vis_mode_visual_line_leave(Vis *vis, Mode *new) {
static void vis_mode_visual_leave(Vis *vis, Mode *new) {
if (!new->visual) {
window_selection_save(vis->win);
view_selections_clear(vis->win->view);
view_selections_clear_all(vis->win->view);
}
}

Expand Down

0 comments on commit c4b4eeb

Please sign in to comment.