mirror of
https://github.com/atom/atom.git
synced 2026-02-08 21:55:05 -05:00
Don't terminate selection dragging when a modifier key is pressed
This preserves the ability to add selections via ctrl- or cmd-click.
This commit is contained in:
@@ -1666,7 +1666,7 @@ class TextEditorComponent {
|
||||
// Stop dragging when user interacts with the keyboard. This prevents
|
||||
// unwanted selections in the case edits are performed while selecting text
|
||||
// at the same time.
|
||||
if (this.stopDragging) this.stopDragging()
|
||||
if (this.stopDragging && event.key !== 'Control' && event.key !== 'Alt' && event.key !== 'Meta') this.stopDragging()
|
||||
|
||||
if (this.lastKeydownBeforeKeypress != null) {
|
||||
if (this.lastKeydownBeforeKeypress.code === event.code) {
|
||||
|
||||
Reference in New Issue
Block a user