fix broken replace all function
MODIFY
lib/project-find-view.js
lib/project-find-view.js
@@ -368,18 +368,18 @@ class ProjectFindView {
return;
}
- return this.showResultPane().then(() => {
+ return this.showResultPane().then(async () => {
const pathsPattern = this.pathsEditor.getText();
const replacePattern = this.replaceEditor.getText();
const message = `This will replace '${findPattern}' with '${replacePattern}' ${_.pluralize(this.model.matchCount, 'time')} in ${_.pluralize(this.model.pathCount, 'file')}`;
- const buttonChosen = atom.confirm({
+ const { response } = await atom.confirm({
message: 'Are you sure you want to replace all?',
detailedMessage: message,
buttons: ['OK', 'Cancel']
});
- if (buttonChosen === 0) {
+ if (response === 0) {
this.clearMessages();
return this.model.replace(pathsPattern, replacePattern, this.model.getPaths());
}

fix broken replace all function