Merge pull request #14435 from atom/mb-use-native-text-buffer

Use new native text-buffer implementation
This commit is contained in:
Max Brunsfeld
2017-06-08 16:50:53 -07:00
committed by GitHub
24 changed files with 1943 additions and 1589 deletions

View File

@@ -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')) {