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

unwanted extra newline #15

Closed giorgiobeggiora closed 7 years ago

giorgiobeggiora commented 7 years ago

In standard Atom (without amcp) for Mac, if i create cursors (cmd+click) before and after a portion of a text in a line, and then i hit Enter, that portion of text goes well indented on a new line.

If i do it with amcp (alt+x), under the portion of text an extra empty new line is created.

Is it possibile to fix this?

Thanks.

kankaristo commented 7 years ago

Are you marking both positions? You don't actually need to mark the last position (just move your cursor there, but don't mark), and it should work as you'd expect.

It's a bit counterintuitive, but if you mark and then don't move the cursor again, you actually have 2 cursors in the same position, so hitting enter (or writing any character) creates 2 newlines. Afterwards, the 2 cursors are joined into one (similar to pressing Home, if you have multiple cursors on the same line), so it returns back to "normal".

giorgiobeggiora commented 7 years ago

great! thanks a lot, it works like a charm