vlang / ved

1 MB text editor written in V with hardware accelerated text rendering. Compiles in <1s.
GNU General Public License v3.0
1.34k stars 78 forks source link

fix invalid cursor states and visual selection issues #168

Open mheister opened 1 year ago

mheister commented 1 year ago

I found that pressing dd on the last line twice would make the program crash and made changes to prevent the cursor staying in invalid positions after dd and deletion of a visual selection. As I found it hard to test these things separately, this also changes the behavior of visual selections such that selections with starting line below end line can be yanked/deleted and prevents the internal end position of the selection to go negative.

spytheman commented 4 months ago

@medvednikov what do you think?