You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While writing the paste functionality for the multi-cursor addition, I was focused on ensuring it was possible essentially to paste one line each cursor from the clipboard. For handling a mismatch in the number of lines and the number of cursors, I chose to use the smaller of the two either not pasting anything for extra cursors beyond the number of lines in the clipboard, or not pasting all the lines from the clipboard if there are not enough cursors.
I can see some limited examples of wanting that behavior, however it was pointed out that perhaps it should instead fall back to pasting the entire clipboard for each cursor in the case of a mismatch. (VSCode does this, and IMHO is a fine benchmark for implementation)
Hi @athompson673 thanks for opening this issue and your prompt response to the multicursor implementation feedback over #2112 ! From my side seems like the current implementation is okay but maybe doing some investigation about how other editors/IDEs do the multicursor pasting besides VSCode and Spyder could be worthy (in that way we could see if there is some sort of convention in regards to how the multicursor paste should work) 🤔
Also, from a quick check, seems like on VSCode they have an option to config the multicursor pasting but only to cover the case where the lines to be pasted are equal to the number of cursors available (depending on that option you get to paste the full clipboard in each line or just match one line per cursor):
What do you think this @spyder-ide/core-developers ?
While writing the paste functionality for the multi-cursor addition, I was focused on ensuring it was possible essentially to paste one line each cursor from the clipboard. For handling a mismatch in the number of lines and the number of cursors, I chose to use the smaller of the two either not pasting anything for extra cursors beyond the number of lines in the clipboard, or not pasting all the lines from the clipboard if there are not enough cursors.
I can see some limited examples of wanting that behavior, however it was pointed out that perhaps it should instead fall back to pasting the entire clipboard for each cursor in the case of a mismatch. (VSCode does this, and IMHO is a fine benchmark for implementation)
The implementation is quite simple:
change:
to
within
MultiCursorMixin.multi_cursor_paste
I would like some input however before posting it as a PR.
The text was updated successfully, but these errors were encountered: