diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-07-12 19:05:03 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-07-14 11:45:15 +0200 |
| commit | 386eac2063bdda79279bbdea2fffcd7fc0ff682a (patch) | |
| tree | 73ef16bc7f07ba8848020b98be3cde123f5b0a36 /sam.c | |
| parent | 546917d21ca10214c24d3871c92b81265de6958c (diff) | |
| download | vis-386eac2063bdda79279bbdea2fffcd7fc0ff682a.tar.gz vis-386eac2063bdda79279bbdea2fffcd7fc0ff682a.tar.xz | |
vis-lua: make selection first class primitives in Lua API
Diffstat (limited to 'sam.c')
| -rw-r--r-- | sam.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1224,7 +1224,7 @@ enum SamError sam_cmd(Vis *vis, const char *s) { if (c->cursor) { if (visual) { view_selections_set(c->cursor, &sel); - view_selections_anchor(c->cursor); + view_selections_anchor(c->cursor, true); } else { if (memchr(c->data, '\n', c->len)) view_cursors_to(c->cursor, sel.start); @@ -1235,7 +1235,7 @@ enum SamError sam_cmd(Vis *vis, const char *s) { Selection *cursor = view_selections_new(c->win->view, sel.start); if (cursor) { view_selections_set(cursor, &sel); - view_selections_anchor(cursor); + view_selections_anchor(cursor, true); } } } @@ -1512,7 +1512,7 @@ static bool cmd_print(Vis *vis, Win *win, Command *cmd, const char *argv[], Sele return false; if (range->start != range->end) { view_selections_set(sel, range); - view_selections_anchor(sel); + view_selections_anchor(sel, true); } else { view_cursors_to(sel, range->start); view_selection_clear(sel); |
