summaryrefslogtreecommitdiff
path: root/src/normal.cc
diff options
context:
space:
mode:
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: