Repository navigation
Fixed #4375 - Multiple Cursors now go to the next logical line - #49318
Conversation
Alexandru Dima (alexdima)
left a comment
There was a problem hiding this comment.
I'm sorry, but this is not a good way to tackle this.
This should be implemented inside CursorMoveCommands.addCursorUp and CursorMoveCommands.addCursorDown which should each get a new argument if they should use the view model or the model. In both of these functions, MoveOperations.translateDown or MoveOperations.translateUp can accept the view model or the model.
Then, InsertCursorAbove and InsertCursorBelow can use a new introduced argument by looking at the args passed in to their run methods.
Finally, this new behaviour would be something triggerable via passing args to the keybindings. e.g.:
{
"key": "alt+cmd+up",
"command": "editor.action.insertCursorAbove",
"when": "editorTextFocus",
"args": {
"logicalLines": true
}
},
The argument can be called something different than logicalLine. I'm not sure of a good name at this time.
|
Thanks for your feedback. I'll take your suggestions and hopefully have something out by the end of the week. |
|
alexandrudima . A made a couple of changes based on your suggestions. First I move my logical line logic to However, I need a bit of help when it comes to turning this option on and off. I saw that you mentioned that it would be possible to have be triggerable via keybindings. Would the logicalLine args be passed through to Do you want it to look like how the I'm wondering can you expand on that? |
…sor.insertAbove`
|
👍 |
This PR fixes #4375.
When adding multiple cursors it now only creates cursors for logical lines instead of visual lines.
Adding Cursors Down:

Adding Cursors Up:

Thanks for considering this PR.