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
{{ message }}
This repository was archived by the owner on Apr 16, 2026. It is now read-only.
In many editors, when the selection is a cursor (or multiple cursors), copy and cut operate on the line(s) containing the cursor(s). This is a very handy feature for quickly moving code around, and we get this request a lot in Brackets.
Is this possible to implement in CodeMirror? I don't fully understand how CM manages the clipboard operations (since I know you can't directly mess with the clipboard from JS), but my understanding is that it's managed via the hidden input field. Would it be possible to make it so that when the selection is a cursor/cursors, the hidden input field contains the lines containing the cursors and selects them? Or would that mess up other logic that relies on the input field?
In many editors, when the selection is a cursor (or multiple cursors), copy and cut operate on the line(s) containing the cursor(s). This is a very handy feature for quickly moving code around, and we get this request a lot in Brackets.
Is this possible to implement in CodeMirror? I don't fully understand how CM manages the clipboard operations (since I know you can't directly mess with the clipboard from JS), but my understanding is that it's managed via the hidden input field. Would it be possible to make it so that when the selection is a cursor/cursors, the hidden input field contains the lines containing the cursors and selects them? Or would that mess up other logic that relies on the input field?