mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
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].
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user