Move to first character of line that symbol is on

This commit is contained in:
Kevin Sawicki
2012-12-13 10:35:50 -08:00
parent 82dd3ddf73
commit 7a7bdd7f8e
2 changed files with 2 additions and 1 deletions

View File

@@ -98,7 +98,7 @@ describe "OutlineView", ->
outlineView.attach()
expect(rootView.find('.outline-view')).toExist()
outlineView.confirmed(tags[1])
expect(rootView.getActiveEditor().getCursorBufferPosition()).toEqual [1,0]
expect(rootView.getActiveEditor().getCursorBufferPosition()).toEqual [1,2]
describe "TagGenerator", ->
it "generates tags for all JavaScript functions", ->

View File

@@ -53,6 +53,7 @@ class OutlineView extends SelectList
editor = @rootView.getActiveEditor()
editor.scrollToBufferPosition(position, center: true)
editor.setCursorBufferPosition(position)
editor.moveCursorToFirstCharacterOfLine()
cancelled: ->
@miniEditor.setText('')