From 93586d241099c008ce2c313a3834e9450d0e1634 Mon Sep 17 00:00:00 2001 From: Jong Eun Lee Date: Fri, 7 Aug 2015 19:38:35 +0900 Subject: [PATCH] fix : workspace.open with initial cursor position bug When opening already opened file via `atom.workspace.open(path,{ initialLine: 0, initialColumn: 0, searchAllPanes: true} )`, cursor position doesn't move `[0,0]`. Expected result: Whether or not file is opened already, cursor position has to be [0,0]. --- src/workspace.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/workspace.coffee b/src/workspace.coffee index 4122d8dad..6c3a0d6f9 100644 --- a/src/workspace.coffee +++ b/src/workspace.coffee @@ -472,7 +472,7 @@ class Workspace extends Model initialLine = options.initialLine if Number.isFinite(options.initialColumn) initialColumn = options.initialColumn - if initialLine > 0 or initialColumn > 0 + if initialLine > 0 or initialColumn > 0 or options.initialLine? or options.initialColumn? item.setCursorBufferPosition?([initialLine, initialColumn]) index = pane.getActiveItemIndex()