diff options
| author | Jeremy Bobbin <jer@jer.cx> | 2023-02-11 06:57:51 -0800 |
|---|---|---|
| committer | Felix Van der Jeugt <felix.vanderjeugt@posteo.net> | 2023-03-19 13:57:06 +0100 |
| commit | c22b2c2937d9dd65d0609e57f948f08da7f5c5ea (patch) | |
| tree | 5eceb3fc8524cf8c5fc0c2893613f95894685ee6 | |
| parent | d4eeba39c561ae719ba64d881ea426120f1b313d (diff) | |
| download | vis-c22b2c2937d9dd65d0609e57f948f08da7f5c5ea.tar.gz vis-c22b2c2937d9dd65d0609e57f948f08da7f5c5ea.tar.xz | |
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
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | view.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index bc0d310..967f807 100644 --- 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 @@ -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; |
