From 386eac2063bdda79279bbdea2fffcd7fc0ff682a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 12 Jul 2017 19:05:03 +0200 Subject: vis-lua: make selection first class primitives in Lua API --- main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index c911c69..6c92715 100644 --- a/main.c +++ b/main.c @@ -1345,8 +1345,7 @@ static const char *selections_new(Vis *vis, const char *keys, const Arg *arg) { } if (sel_new) { view_selections_primary_set(sel_new); - if (anchored) - view_selections_anchor(sel_new); + view_selections_anchor(sel_new, anchored); } } vis_count_set(vis, VIS_COUNT_UNKNOWN); @@ -1452,7 +1451,7 @@ static const char *selections_match_next(Vis *vis, const char *keys, const Arg * size_t pos = text_char_prev(txt, word.end); if ((s = view_selections_new(view, pos))) { view_selections_set(s, &word); - view_selections_anchor(s); + view_selections_anchor(s, true); view_selections_primary_set(s); goto out; } @@ -1465,7 +1464,7 @@ static const char *selections_match_next(Vis *vis, const char *keys, const Arg * size_t pos = text_char_prev(txt, word.end); if ((s = view_selections_new(view, pos))) { view_selections_set(s, &word); - view_selections_anchor(s); + view_selections_anchor(s, true); view_selections_primary_set(s); } -- cgit v1.2.3