brenton-leighton / multiple-cursors.nvim

A multi-cursor plugin for Neovim that works in normal, insert/replace, or visual modes, and with almost every command
Apache License 2.0
249 stars 7 forks source link

fix abnormal motion of main cursor & add highlight for locked state #77

Open Jaehaks opened 1 week ago

Jaehaks commented 1 week ago
  1. Problem (fix to #76 ) 1) normal motion in indented line doesn't consider curswant when it move to up and down (j ,k) it makes main cursor move by the difference between curswant and col additionally 2) Cursor's highlight doesn't change when its state changes to locked.

  2. Solution 1) Considering curswant, cursor column number is remained when it moves up and down in indented line 2) Add MultipleCursorsLockCursor to toggle highlight in locked state

Jaehaks commented 1 week ago

Additional bugs are found. 1) main cursor moves multiple times by the number of multiple cursors, for example, 'j' move cursor down 3 times not 1 times if the number of multiple cursors is 3. 2) If we start MultipleCursorsAddDown right after escaping multiple-cursor mode in indented line, second multiple cursor moves left by the indentation 3) curswant doesn't remain if main cursor moves to short line