vis

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

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

commit b6647ad017d2acb8429d54d143c0eb4c444d3054
parent b86e49eb64891f0fdcf83470de655107f5af622d
Author: Jeremy Bobbin <jer@jer.cx>
Date:   Sat, 11 Feb 2023 06:57:51 -0800

fix bug where visual-line selections after view were considered visible

prior to this patch, if you had a visual-line selection after the view,
and try to move it(& all other selections) up into the buffer, the
selection would appear prematurely.

https://github.com/martanne/vis/issues/1074

Diffstat:
MCHANGELOG.md | 1+
Mview.c | 2+-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -6,6 +6,7 @@ - fix a ~ being considered a special character in path patterns (except at the start) - improvements to and clean-up of vis-open - add Selection:remove() to lua API +- fix bug where visual-line selections after view were considered visible ## [0.8] - 2022-11-01 diff --git a/view.c b/view.c @@ -283,7 +283,7 @@ bool view_coord_get(View *view, size_t pos, Line **retline, int *retrow, int *re size_t cur = view->start; Line *line = view->topline; - if (pos < view->start || pos > view->end) { + if (pos < view->start || pos >= view->end) { if (retline) *retline = NULL; if (retrow) *retrow = -1; if (retcol) *retcol = -1;