vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 631a5b18d73c5d89985e458c841b7e626d38f670
parent 1ef9c22a5767dfdf21360224f780a4793e1c31db
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Mon, 12 Jun 2017 18:16:06 +0200

view: rename view_selections_clear

Diffstat:
Mview.c | 4++--
Mview.h | 2+-
Mvis-modes.c | 4++--
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/view.c b/view.c @@ -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); } @@ -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); diff --git a/view.h b/view.h @@ -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 diff --git a/vis-modes.c b/vis-modes.c @@ -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)); } @@ -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); } }