summaryrefslogtreecommitdiff
path: root/src/normal.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/normal.cc')
-rw-r--r--src/normal.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/normal.cc b/src/normal.cc
index 019ed58a..03e7895c 100644
--- a/src/normal.cc
+++ b/src/normal.cc
@@ -866,7 +866,8 @@ void regex_prompt(Context& context, String prompt, char reg, T func)
RegisterManager::instance()[reg].set(context, str.str());
break;
case PromptEvent::Validate:
- RegisterManager::instance()[reg].set(context, str.str());
+ if (not str.empty())
+ RegisterManager::instance()[reg].set(context, str.str());
context.push_jump();
break;
}