summaryrefslogtreecommitdiff
path: root/src/normal.cc
diff options
context:
space:
mode:
authorJohannes Altmanninger <aclopte@gmail.com>2023-11-11 12:32:18 +0100
committerJohannes Altmanninger <aclopte@gmail.com>2023-11-11 14:37:32 +0100
commitc597a056d09daa67f028ffd04cab5041f5e56dcb (patch)
treeefe3db458efb1f38a73913a595b3b0d4a4f024ec /src/normal.cc
parent6babba9bfa65de2486b76afb2eced59c79ee8581 (diff)
Fix spurious incremental search when incsearch=false
Regressed in a2c41593a (Fix partial regex text being pushed in history, 2023-11-02).
Diffstat (limited to 'src/normal.cc')
-rw-r--r--src/normal.cc4
1 files changed, 3 insertions, 1 deletions
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: