From ad10da5cc094204eb6f319841ab73246b689abb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sat, 8 Jul 2017 09:52:56 +0200 Subject: vis: cleanup marks implementation We now use ' to refer to marks. Mark a is set using 'am and restored using 'aM while this is slightly harder to type than ma and 'a it is consistent with register usage for yank/put and allows a default mark to be used which is handy for quick selection manipulation primitives. --- vis-lua.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vis-lua.c') diff --git a/vis-lua.c b/vis-lua.c index 91ad645..be14b18 100644 --- a/vis-lua.c +++ b/vis-lua.c @@ -2256,7 +2256,7 @@ static int file_marks_index(lua_State *L) { enum VisMark mark = vis_mark_from(vis, symbol[0]); if (mark == VIS_MARK_INVALID) goto err; - Array arr = vis_register_selections_get(vis, mark); + Array arr = vis_mark_get(vis, mark); range = array_get(&arr, 0); array_release(&arr); err: @@ -2279,7 +2279,7 @@ static int file_marks_newindex(lua_State *L) { array_init_sized(&arr, sizeof(Filerange)); Filerange range = text_range_new(pos, pos); array_add(&arr, &range); - vis_register_selections_set(vis, mark, &arr); + vis_mark_set(vis, mark, &arr); array_release(&arr); } return 0; -- cgit v1.2.3