diff --git a/services/web/public/coffee/ide/editor/EditorManager.coffee b/services/web/public/coffee/ide/editor/EditorManager.coffee index 54d56cac19..64cbe1d884 100644 --- a/services/web/public/coffee/ide/editor/EditorManager.coffee +++ b/services/web/public/coffee/ide/editor/EditorManager.coffee @@ -46,7 +46,7 @@ define [ done = () => if options.gotoLine? - @$scope.$broadcast "editor:gotoLine", options.gotoLine + @$scope.$broadcast "editor:gotoLine", options.gotoLine, options.gotoColumn if doc.id == @$scope.editor.open_doc_id and !options.forceReopen @$scope.$apply () => diff --git a/services/web/public/coffee/ide/editor/directives/aceEditor/cursor-position/CursorPositionManager.coffee b/services/web/public/coffee/ide/editor/directives/aceEditor/cursor-position/CursorPositionManager.coffee index 7019b213b5..6e238122e1 100644 --- a/services/web/public/coffee/ide/editor/directives/aceEditor/cursor-position/CursorPositionManager.coffee +++ b/services/web/public/coffee/ide/editor/directives/aceEditor/cursor-position/CursorPositionManager.coffee @@ -23,10 +23,10 @@ define [], () -> @storeCursorPosition(@editor.getSession()) @storeScrollTopPosition(@editor.getSession()) - @$scope.$on "#{@$scope.name}:gotoLine", (editor, value) => - if value? + @$scope.$on "#{@$scope.name}:gotoLine", (editor, line, column) => + if line? setTimeout () => - @gotoLine(value) + @gotoLine(line, column) , 10 # Hack: Must happen after @gotoStoredPosition storeScrollTopPosition: (session) -> @@ -53,6 +53,6 @@ define [], () -> @editor.getSession().setScrollTop(pos.scrollTop or 0) delete @ignoreCursorPositionChanges - gotoLine: (line) -> - @editor.gotoLine(line) - @editor.focus() \ No newline at end of file + gotoLine: (line, column) -> + @editor.gotoLine(line, column) + @editor.focus() diff --git a/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee b/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee index 968cd1b60f..5dff3acb04 100644 --- a/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee +++ b/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee @@ -556,7 +556,9 @@ define [ return if !entity? or entity.type != "doc" if entry.line? line = entry.line - ide.editorManager.openDoc(entity, gotoLine: line) + if entry.column? + column = entry.column + ide.editorManager.openDoc(entity, gotoLine: line, gotoColumn: column) ] App.controller 'ClearCacheModalController', ["$scope", "$modalInstance", ($scope, $modalInstance) ->