Skip to content

Fix cursor bugs

Jeremy Soller requested to merge gmorenz:fix-cursor-bugs into master

Created by: gmorenz

The first commit fixes some division by zero errors, and a technically illegal wrapping add.

The second commit tries to make b and B work a bit more sensibly. The previous behavior was very non-predictable as a user and almost certainly not what was intended. A good way to see this is to make a 10 line file, start at the top and enter bj repeatedly until you reach the bottom, then enter B repeatedly until you delete all but one cursor.

I haven't used this sort of cursor functionality before, so it's entirely possible the new behavior is also not ideal. The idea behind it was vaguely that users could use them as stacks of cursors holding places to return to. Do any editors have similar functionality that I should try out?

Merge request reports