From c7de0ba3bc5cd3224eb6e5f5e8ccfead9a1bc1fa Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Tue, 23 Jul 2013 14:30:29 -0700 Subject: [PATCH] fix #634 jump to the beginning of the fold when clicking on folded block. --- src/app/editor.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/editor.coffee b/src/app/editor.coffee index 40af4a827..317c0dbb4 100644 --- a/src/app/editor.coffee +++ b/src/app/editor.coffee @@ -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) =>