From 5c600e15c1c1ab64f385de918c93d2bdb23955d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 6 Jul 2017 21:28:51 +0200 Subject: vis: use marks instead of registers to store selections The key binding remain the same, but the selections are now stored on a per-buffer basis. --- main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index fc6e0a0..3dd9d81 100644 --- a/main.c +++ b/main.c @@ -2042,7 +2042,10 @@ static const char *mark_set(Vis *vis, const char *keys, const Arg *arg) { return NULL; if (keys[1]) return vis_keys_next(vis, keys); - vis_mark_set(vis, vis_mark_from(vis, keys[0]), view_cursor_get(vis_view(vis))); + View *view = vis_view(vis); + Array sel = view_selections_get_all(view); + vis_register_selections_set(vis, vis_mark_from(vis, keys[0]), &sel); + array_release(&sel); return keys+1; } -- cgit v1.2.3