onivim / oni2

Native, lightweight modal code editor
https://v2.onivim.io
MIT License
7.76k stars 274 forks source link

Wrapping bug when appending in block visual mode #3838

Open baffalop opened 2 years ago

baffalop commented 2 years ago

When visual block is selected which reaches to the end of the selected lines, pressing A puts the insert cursors at the beginning of the lines, shifted down one line. I'm guessing some kind of soft-wrapping behaviour is kicking in when it shouldn't, or the position is overflowing to the next line.

Example

With a visual block selection on lines 64-71:

image

After pressing A:

image

Expectation: cursors at the ends of lines 64-71
Actual behaviour: cursors at the beginnings of lines 64-72

After typing a character and returning to normal mode:

image

Environment

Onivim Version 0.5.9-nightly (0.5.2198) macOS 11.2.3