vis

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

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

commit 726060c1f31a77a27354233e88cfeedbe5b0664f
parent e8e3bd48987fed71d3701b12f963ad86cb57271d
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Mon, 12 Jun 2017 18:22:50 +0200

view: view_cursors_selection_restore

Diffstat:
Mmain.c | 2+-
Mview.c | 2+-
Mview.h | 2+-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/main.c b/main.c @@ -1669,7 +1669,7 @@ static const char *selection_restore(Vis *vis, const char *keys, const Arg *arg) Text *txt = vis_text(vis); View *view = vis_view(vis); for (Cursor *c = view_cursors(view); c; c = view_cursors_next(c)) - view_cursors_selection_restore(c); + view_selections_restore(c); Filerange sel = view_selection_get(view); if (text_range_is_linewise(txt, &sel)) vis_mode_switch(vis, VIS_MODE_VISUAL_LINE); diff --git a/view.c b/view.c @@ -1239,7 +1239,7 @@ void view_selections_save(Selection *s) { s->region.anchor = s->anchor; } -bool view_cursors_selection_restore(Selection *s) { +bool view_selections_restore(Selection *s) { Text *txt = s->view->text; size_t pos = text_mark_get(txt, s->region.cursor); if (pos == EPOS) diff --git a/view.h b/view.h @@ -340,7 +340,7 @@ void view_selections_save(Selection*); * .. note:: Fails if selection boundaries no longer exist. * @endrst */ -bool view_cursors_selection_restore(Selection*); +bool view_selections_restore(Selection*); /** * @} * @defgroup view_style