From daa1d80865ed4a412cfd8b61a82abf9dfa3d0288 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Thu, 11 Aug 2016 16:46:12 +0100 Subject: [PATCH] add extra delay to gotoLine event --- services/web/public/coffee/ide/editor/EditorManager.coffee | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/services/web/public/coffee/ide/editor/EditorManager.coffee b/services/web/public/coffee/ide/editor/EditorManager.coffee index 64cbe1d884..be15958c37 100644 --- a/services/web/public/coffee/ide/editor/EditorManager.coffee +++ b/services/web/public/coffee/ide/editor/EditorManager.coffee @@ -46,8 +46,11 @@ define [ done = () => if options.gotoLine? - @$scope.$broadcast "editor:gotoLine", options.gotoLine, options.gotoColumn - + # allow Ace to display document before moving, delay until next tick + setTimeout () => + @$scope.$broadcast "editor:gotoLine", options.gotoLine, options.gotoColumn + ,0 + if doc.id == @$scope.editor.open_doc_id and !options.forceReopen @$scope.$apply () => done()