From c597a056d09daa67f028ffd04cab5041f5e56dcb Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sat, 11 Nov 2023 12:32:18 +0100 Subject: Fix spurious incremental search when incsearch=false Regressed in a2c41593a (Fix partial regex text being pushed in history, 2023-11-02). --- src/normal.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/normal.cc') diff --git a/src/normal.cc b/src/normal.cc index 69fc9285..ebe86ebc 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -860,7 +860,9 @@ void regex_prompt(Context& context, String prompt, char reg, T func) { case PromptEvent::Abort: return; case PromptEvent::Change: - if (incsearch and not str.empty()) + if (not incsearch) + return; + if (not str.empty()) RegisterManager::instance()[reg].set(context, str.str()); break; case PromptEvent::Validate: -- cgit v1.2.3