From c22b2c2937d9dd65d0609e57f948f08da7f5c5ea Mon Sep 17 00:00:00 2001 From: Jeremy Bobbin Date: Sat, 11 Feb 2023 06:57:51 -0800 Subject: 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 --- view.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view.c') 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; -- cgit v1.2.3