kankaristo / atom-multi-cursor-plus

Improved multi-cursor functionality for Atom: https://atom.io/packages/multi-cursor-plus
MIT License
20 stars 1 forks source link

Breaks when marking a cursor to the beginning and the end of a buffer #1

Open kankaristo opened 9 years ago

kankaristo commented 9 years ago

Atom doesn't allow creating a cursor on top of another cursor, so multi-cursor-plus creates the new cursor at the beginning of the file and moves it to the same position as the current cursor.

If there is already a cursor at the beginning of the file, the new cursor is created at the end of the file instead.

If there is a cursor at the beginning and end of the file, creating a new cursor doesn't work correctly.

Every line and column in the buffer could be looped through to find a position without an existing cursor, but this could be horrible for performance (every position needs to be checked against every existing cursor). This might work well enough, but some other solution would probably be better.