mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
shift-double-click and shift-triple-click are ignored.
This commit is contained in:
@@ -615,24 +615,28 @@ describe "Editor", ->
|
||||
expect(editor.getSelection().getScreenRange()).toEqual [[4, 7], [5, 24]]
|
||||
|
||||
describe "shift-double-click", ->
|
||||
it "expands the selection to include the double-clicked word", ->
|
||||
it "expands the selection on the first click and ignores the second click", ->
|
||||
editor.setCursorScreenPosition([4, 7])
|
||||
editor.renderedLines.trigger mousedownEvent(editor: editor, point: [5, 24], shiftKey: true, originalEvent: { detail: 1 })
|
||||
editor.renderedLines.trigger 'mouseup'
|
||||
expect(editor.getSelection().getScreenRange()).toEqual [[4, 7], [5, 24]]
|
||||
|
||||
editor.renderedLines.trigger mousedownEvent(editor: editor, point: [5, 24], shiftKey: true, originalEvent: { detail: 2 })
|
||||
editor.renderedLines.trigger 'mouseup'
|
||||
expect(editor.getSelection().getScreenRange()).toEqual [[4, 7], [5, 27]]
|
||||
expect(editor.getSelection().getScreenRange()).toEqual [[4, 7], [5, 24]]
|
||||
|
||||
describe "shift-triple-click", ->
|
||||
it "expands the selection to include the triple-clicked line", ->
|
||||
it "expands the selection on the first click and ignores the second click", ->
|
||||
editor.setCursorScreenPosition([4, 7])
|
||||
editor.renderedLines.trigger mousedownEvent(editor: editor, point: [5, 24], shiftKey: true, originalEvent: { detail: 1 })
|
||||
editor.renderedLines.trigger 'mouseup'
|
||||
expect(editor.getSelection().getScreenRange()).toEqual [[4, 7], [5, 24]]
|
||||
|
||||
editor.renderedLines.trigger mousedownEvent(editor: editor, point: [5, 24], shiftKey: true, originalEvent: { detail: 2 })
|
||||
editor.renderedLines.trigger 'mouseup'
|
||||
editor.renderedLines.trigger mousedownEvent(editor: editor, point: [5, 24], shiftKey: true, originalEvent: { detail: 3 })
|
||||
editor.renderedLines.trigger 'mouseup'
|
||||
expect(editor.getSelection().getScreenRange()).toEqual [[4, 7], [6, 0]]
|
||||
expect(editor.getSelection().getScreenRange()).toEqual [[4, 7], [5, 24]]
|
||||
|
||||
describe "meta-click", ->
|
||||
it "places an additional cursor", ->
|
||||
|
||||
@@ -313,15 +313,9 @@ class Editor extends View
|
||||
else
|
||||
@setCursorScreenPosition(screenPosition)
|
||||
else if clickCount == 2
|
||||
if e.shiftKey
|
||||
@activeEditSession.expandLastSelectionOverWord()
|
||||
else
|
||||
@activeEditSession.selectWord()
|
||||
@activeEditSession.selectWord() unless e.shiftKey
|
||||
else if clickCount == 3
|
||||
if e.shiftKey
|
||||
@activeEditSession.expandLastSelectionOverLine()
|
||||
else
|
||||
@activeEditSession.selectLine()
|
||||
@activeEditSession.selectLine() unless e.shiftKey
|
||||
|
||||
@selectOnMousemoveUntilMouseup()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user