mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Merge pull request #14435 from atom/mb-use-native-text-buffer
Use new native text-buffer implementation
This commit is contained in:
@@ -1340,9 +1340,9 @@ module.exports = class Workspace extends Model {
|
||||
}
|
||||
|
||||
confirmClose (options) {
|
||||
return this.getPaneContainers()
|
||||
.map(container => container.confirmClose(options))
|
||||
.every(saved => saved)
|
||||
return Promise.all(this.getPaneContainers().map(container =>
|
||||
container.confirmClose(options)
|
||||
)).then((results) => !results.includes(false))
|
||||
}
|
||||
|
||||
// Save the active pane item.
|
||||
@@ -1352,7 +1352,7 @@ module.exports = class Workspace extends Model {
|
||||
// {::saveActivePaneItemAs} # will be called instead. This method does nothing
|
||||
// if the active item does not implement a `.save` method.
|
||||
saveActivePaneItem () {
|
||||
this.getCenter().getActivePane().saveActiveItem()
|
||||
return this.getCenter().getActivePane().saveActiveItem()
|
||||
}
|
||||
|
||||
// Prompt the user for a path and save the active pane item to it.
|
||||
@@ -1975,7 +1975,7 @@ module.exports = class Workspace extends Model {
|
||||
if (editor.getPath()) {
|
||||
const checkoutHead = () => {
|
||||
return this.project.repositoryForDirectory(new Directory(editor.getDirectoryPath()))
|
||||
.then(repository => repository != null ? repository.checkoutHeadForEditor(editor) : undefined)
|
||||
.then(repository => repository && repository.checkoutHeadForEditor(editor))
|
||||
}
|
||||
|
||||
if (this.config.get('editor.confirmCheckoutHeadRevision')) {
|
||||
|
||||
Reference in New Issue
Block a user