From 240ab5b0b69702c9679ada63c9ea03f8f7579793 Mon Sep 17 00:00:00 2001 From: Jo Liss Date: Fri, 17 Aug 2018 14:07:20 +0000 Subject: [PATCH] Instantly update live search This change causes find-and-replace to react instantly to keystrokes in the `findEditor` (the "Find in current buffer" field), rather than after a 300ms debounce delay. --- lib/find-view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/find-view.js b/lib/find-view.js index 69b3eba1..acb63ef1 100644 --- a/lib/find-view.js +++ b/lib/find-view.js @@ -277,7 +277,7 @@ class FindView { } handleFindEvents() { - this.findEditor.onDidStopChanging(() => this.liveSearch()); + this.findEditor.onDidChange(() => this.liveSearch()); this.refs.nextButton.addEventListener('click', e => e.shiftKey ? this.findPrevious({focusEditorAfter: true}) : this.findNext({focusEditorAfter: true})); this.refs.findAllButton.addEventListener('click', this.findAll.bind(this)); this.subscriptions.add(atom.commands.add('atom-workspace', {