aboutsummaryrefslogtreecommitdiff
path: root/view.c
diff options
context:
space:
mode:
authorJeremy Bobbin <jer@jer.cx>2023-02-11 06:57:51 -0800
committerFelix Van der Jeugt <felix.vanderjeugt@posteo.net>2023-03-19 13:57:06 +0100
commitc22b2c2937d9dd65d0609e57f948f08da7f5c5ea (patch)
tree5eceb3fc8524cf8c5fc0c2893613f95894685ee6 /view.c
parentd4eeba39c561ae719ba64d881ea426120f1b313d (diff)
downloadvis-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
Diffstat (limited to 'view.c')
-rw-r--r--view.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/view.c b/view.c
index 2788d85..afa0c0e 100644
--- 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;