vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 1d2715fdc3966828a7d2fc2aeb8e062b0860e7b0 parent 631a5b18d73c5d89985e458c841b7e626d38f670 Author: Marc André Tanner <mat@brain-dump.org> Date: Mon, 12 Jun 2017 18:17:15 +0200 view: rename view_cursors_selection_clear Diffstat:
| M | main.c | | | 2 | +- |
| M | sam.c | | | 2 | +- |
| M | view.c | | | 6 | +++--- |
| M | view.h | | | 2 | +- |
| M | vis-lua.c | | | 2 | +- |
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/main.c b/main.c @@ -1348,7 +1348,7 @@ static const char *cursors_clear(Vis *vis, const char *keys, const Arg *arg) { if (view_cursors_count(view) > 1) view_selections_dispose_all(view); else - view_cursors_selection_clear(view_selections_primary_get(view)); + view_selection_clear(view_selections_primary_get(view)); return keys; } diff --git a/sam.c b/sam.c @@ -1507,7 +1507,7 @@ static bool cmd_print(Vis *vis, Win *win, Command *cmd, const char *argv[], Curs view_selections_set(cur, range); view_cursors_selection_start(cur); } else { - view_cursors_selection_clear(cur); + view_selection_clear(cur); } } return cur != NULL; diff --git a/view.c b/view.c @@ -1036,7 +1036,7 @@ bool view_selections_dispose_force(Cursor *c) { View *view = c->view; if (view->cursor_dead) return false; - view_cursors_selection_clear(c); + view_selection_clear(c); view->cursor_dead = c; return true; } @@ -1165,7 +1165,7 @@ void view_cursors_selection_start(Cursor *c) { c->anchored = true; } -void view_cursors_selection_clear(Cursor *c) { +void view_selection_clear(Cursor *c) { c->anchored = false; c->anchor = c->cursor; c->view->need_update = true; @@ -1184,7 +1184,7 @@ bool view_selection_anchored(Selection *s) { void view_selections_clear_all(View *view) { for (Cursor *c = view->cursors; c; c = c->next) - view_cursors_selection_clear(c); + view_selection_clear(c); view_draw(view); } diff --git a/view.h b/view.h @@ -194,7 +194,7 @@ void view_selections_set(Cursor*, const Filerange*); * .. note:: Sets selection to non-anchored mode. * @endrst */ -void view_cursors_selection_clear(Cursor*); +void view_selection_clear(Cursor*); /** Reduce *all* currently active selections. */ void view_selections_clear_all(View*); /** diff --git a/vis-lua.c b/vis-lua.c @@ -1890,7 +1890,7 @@ static int window_cursor_newindex(lua_State *L) { if (text_range_valid(&sel)) view_selections_set(cur, &sel); else - view_cursors_selection_clear(cur); + view_selection_clear(cur); return 0; } }