Select row when clicking the gutter

This commit is contained in:
Ivan Zuzak 2014-08-30 20:20:09 +02:00
parent 7f2d9984b8
commit 8c36d2673b
2 changed files with 3 additions and 3 deletions

View File

@ -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 ->

View File

@ -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