Fix not being able to change find options in non-editor tabs
MODIFY
lib/buffer-search.js
lib/buffer-search.js
@@ -72,7 +72,8 @@ class BufferSearch {
Object.assign(options, otherOptions);
const changedParams = this.findOptions.set(options);
- if (changedParams.findPattern != null ||
+ if (!this.editor ||
+ changedParams.findPattern != null ||
changedParams.useRegex != null ||
changedParams.wholeWord != null ||
changedParams.caseSensitive != null ||

MODIFY
lib/find-view.js
lib/find-view.js
@@ -325,8 +325,6 @@ class FindView {
}
liveSearch() {
- const editor = this.model.getEditor();
- if (!editor) return null;
let findPattern = this.findEditor.getText();
if (findPattern.length === 0 || (findPattern.length >= atom.config.get('find-and-replace.liveSearchMinimumCharacters') && !this.model.patternMatchesEmptyString(findPattern))) {
return this.model.search(findPattern);
@@ -334,8 +332,6 @@ class FindView {
}
search(findPattern, options) {
- const editor = this.model.getEditor();
- if (!editor) return null;
if (arguments.length === 1 && typeof findPattern === 'object') {
options = findPattern;
findPattern = null;

Fix not being able to change find options in non-editor tabs