mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Merge pull request #14107 from atom/fb-mdt-open-always-adds-item
Always add opened items to the workspace
This commit is contained in:
@@ -719,7 +719,9 @@ module.exports = class Workspace extends Model {
|
||||
|
||||
this.itemOpened(item)
|
||||
|
||||
if (options.activateItem !== false) {
|
||||
if (options.activateItem === false) {
|
||||
pane.addItem(item, {pending: options.pending})
|
||||
} else {
|
||||
pane.activateItem(item, {pending: options.pending})
|
||||
}
|
||||
|
||||
@@ -841,6 +843,13 @@ module.exports = class Workspace extends Model {
|
||||
return this.open(uri, {pane})
|
||||
}
|
||||
|
||||
// Public: Creates a new item that corresponds to the provided URI.
|
||||
//
|
||||
// If no URI is given, or no registered opener can open the URI, a new empty
|
||||
// {TextEditor} will be created.
|
||||
//
|
||||
// * `uri` A {String} containing a URI.
|
||||
//
|
||||
// Returns a {Promise} that resolves to the {TextEditor} (or other item) for the given URI.
|
||||
createItemForURI (uri, options) {
|
||||
if (uri != null) {
|
||||
|
||||
Reference in New Issue
Block a user