fix #634 jump to the beginning of the fold when clicking on folded block.

This commit is contained in:
Ben Ogle
2013-07-23 14:30:29 -07:00
committed by Ben Ogle & Corey Johnson
parent 16cce1efb1
commit c7de0ba3bc

View File

@@ -649,7 +649,10 @@ class Editor extends View
false if @isFocused
@renderedLines.on 'mousedown', '.fold.line', (e) =>
@activeEditSession.destroyFoldWithId($(e.currentTarget).attr('fold-id'))
id = $(e.currentTarget).attr('fold-id')
marker = @activeEditSession.displayBuffer.getMarker(id)
@activeEditSession.setCursorBufferPosition(marker.getBufferRange().start)
@activeEditSession.destroyFoldWithId(id)
false
@renderedLines.on 'mousedown', (e) =>