martanne / vis

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disappearing selection

jk411 opened this issue · comments

Open

vis vis.c

Start "visual-line" mode [Shift-v]
keep pressing [arrow-down] or [ j ] ie. move cursor down

selection disappears when anchor is out of screen
the same happens in "visual-char" mode when cursor lands on empty line

maybe
viev.c: view_coord_get()
if (pos < view->start || (pos >= view->end && !eof)) {...

shoul be
if (pos < view->start || (pos > view->end && !eof)) {...

Hi,

I've seen this before as well. It seems like the bug was introduced
in c22b2c2 and its reported 'fix' in 364d212 didn't solve it. I
think it might be time to revert both of those since they cause
more bugs than they fix. Doing so would reintroduce #1074 but that
could very well be a bug elsewhere.