diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-06-12 18:19:14 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-06-15 15:51:43 +0200 |
| commit | 2b472cece9f60b6f3e610ea8a7fc36173557fe0c (patch) | |
| tree | 155cc2f02428a2a44c1aa909591b43a5bc95fa18 | |
| parent | b8238266e4c6961fbdcc635a86809b5687db99da (diff) | |
| download | vis-2b472cece9f60b6f3e610ea8a7fc36173557fe0c.tar.gz vis-2b472cece9f60b6f3e610ea8a7fc36173557fe0c.tar.xz | |
view: rename view_cursors_selection_start
| -rw-r--r-- | sam.c | 6 | ||||
| -rw-r--r-- | view.c | 2 | ||||
| -rw-r--r-- | view.h | 2 | ||||
| -rw-r--r-- | vis-modes.c | 4 |
4 files changed, 7 insertions, 7 deletions
@@ -1213,7 +1213,7 @@ enum SamError sam_cmd(Vis *vis, const char *s) { if (c->cursor) { if (visual) { view_selections_set(c->cursor, &sel); - view_cursors_selection_start(c->cursor); + view_selections_anchor(c->cursor); } else { if (memchr(c->data, '\n', c->len)) view_cursors_to(c->cursor, sel.start); @@ -1224,7 +1224,7 @@ enum SamError sam_cmd(Vis *vis, const char *s) { Cursor *cursor = view_selections_new(c->win->view, sel.start); if (cursor) { view_selections_set(cursor, &sel); - view_cursors_selection_start(cursor); + view_selections_anchor(cursor); } } } @@ -1505,7 +1505,7 @@ static bool cmd_print(Vis *vis, Win *win, Command *cmd, const char *argv[], Curs if (cur) { if (range->start != range->end) { view_selections_set(cur, range); - view_cursors_selection_start(cur); + view_selections_anchor(cur); } else { view_selection_clear(cur); } @@ -1161,7 +1161,7 @@ void view_cursors_place(Cursor *c, size_t line, size_t col) { view_cursors_to(c, pos); } -void view_cursors_selection_start(Cursor *c) { +void view_selections_anchor(Cursor *c) { c->anchored = true; } @@ -213,7 +213,7 @@ void view_selections_flip(Cursor*); * Anchor selection. * Further updates will only update the cursor, the anchor will remain fixed. */ -void view_cursors_selection_start(Cursor*); +void view_selections_anchor(Cursor*); /** Check whether selection is anchored. */ bool view_selection_anchored(Cursor*); /** Get position of selection cursor. */ diff --git a/vis-modes.c b/vis-modes.c index 470c155..87a61a7 100644 --- a/vis-modes.c +++ b/vis-modes.c @@ -186,14 +186,14 @@ static void vis_mode_operator_input(Vis *vis, const char *str, size_t len) { static void vis_mode_visual_enter(Vis *vis, Mode *old) { if (!old->visual) { for (Cursor *c = view_cursors(vis->win->view); c; c = view_cursors_next(c)) - view_cursors_selection_start(c); + view_selections_anchor(c); } } static void vis_mode_visual_line_enter(Vis *vis, Mode *old) { if (!old->visual) { for (Cursor *c = view_cursors(vis->win->view); c; c = view_cursors_next(c)) - view_cursors_selection_start(c); + view_selections_anchor(c); } if (!vis->action.op) vis_motion(vis, VIS_MOVE_NOP); |
