mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Call setCursorBufferPosition only if this method exists
@kevinsawicki: That way in the case where a custom editor is opened that isn't a text editor, it won't blow up if the custom editor doesn't implement setCursorBufferPosition.
This commit is contained in:
@@ -456,7 +456,7 @@ class Workspace extends Model
|
||||
pane.activateItem(item)
|
||||
pane.activate() if activatePane
|
||||
if options.initialLine? or options.initialColumn?
|
||||
item.setCursorBufferPosition([options.initialLine, options.initialColumn])
|
||||
item.setCursorBufferPosition?([options.initialLine, options.initialColumn])
|
||||
index = pane.getActiveItemIndex()
|
||||
@emit "uri-opened"
|
||||
@emitter.emit 'did-open', {uri, pane, item, index}
|
||||
|
||||
Reference in New Issue
Block a user