mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-21 07:58:04 +03:00
Select row when clicking the gutter
This commit is contained in:
parent
7f2d9984b8
commit
8c36d2673b
@ -1331,9 +1331,9 @@ describe "EditorComponent", ->
|
||||
gutterNode = componentNode.querySelector('.gutter')
|
||||
|
||||
describe "when the gutter is clicked", ->
|
||||
it "moves the cursor to the beginning of the clicked row", ->
|
||||
it "selects the clicked row", ->
|
||||
gutterNode.dispatchEvent(buildMouseEvent('mousedown', clientCoordinatesForScreenRowInGutter(4)))
|
||||
expect(editor.getCursorScreenPosition()).toEqual [4, 0]
|
||||
expect(editor.getSelectedScreenRange()).toEqual [[4, 0], [5, 0]]
|
||||
|
||||
describe "when the gutter is shift-clicked", ->
|
||||
beforeEach ->
|
||||
|
@ -649,7 +649,7 @@ EditorComponent = React.createClass
|
||||
{editor} = @props
|
||||
clickedRow = @screenPositionForMouseEvent(event).row
|
||||
|
||||
editor.setCursorScreenPosition([clickedRow, 0])
|
||||
editor.setSelectedScreenRange([[clickedRow, 0], [clickedRow + 1, 0]])
|
||||
|
||||
@handleDragUntilMouseUp event, (screenPosition) ->
|
||||
dragRow = screenPosition.row
|
||||
|
Loading…
Reference in New Issue
Block a user