vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit e8e3bd48987fed71d3701b12f963ad86cb57271d parent fbdfdd11a9884cf8761ad368eff0ab0f56011c05 Author: Marc André Tanner <mat@brain-dump.org> Date: Mon, 12 Jun 2017 18:22:22 +0200 view: rename view_cursors_selection_save Diffstat:
| M | view.c | | | 2 | +- |
| M | view.h | | | 2 | +- |
| M | vis.c | | | 4 | ++-- |
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/view.c b/view.c @@ -1234,7 +1234,7 @@ void view_selections_set(Selection *s, const Filerange *r) { view_cursors_to(s, text_mark_get(s->view->text, s->cursor)); } -void view_cursors_selection_save(Selection *s) { +void view_selections_save(Selection *s) { s->region.cursor = s->cursor; s->region.anchor = s->anchor; } diff --git a/view.h b/view.h @@ -333,7 +333,7 @@ Filerange view_selection_get(View*); * @{ */ /** Save selection which can later be restored. */ -void view_cursors_selection_save(Selection*); +void view_selections_save(Selection*); /** * Restore a previously active selection. * @rst diff --git a/vis.c b/vis.c @@ -252,7 +252,7 @@ void window_selection_save(Win *win) { file->marks[VIS_MARK_SELECTION_END] = text_mark_set(file->text, sel.end); if (!vis->action.op) { for (Selection *s = view_cursors(win->view); s; s = view_cursors_next(s)) - view_cursors_selection_save(s); + view_selections_save(s); } } @@ -980,7 +980,7 @@ void vis_do(Vis *vis) { view_selections_dispose(cursor); } else if (pos <= text_size(txt)) { if (vis->mode->visual) - view_cursors_selection_save(cursor); + view_selections_save(cursor); view_cursors_to(cursor, pos); } }