summaryrefslogtreecommitdiffstats
path: root/src/ex_eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ex_eval.c')
-rw-r--r--src/ex_eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ex_eval.c b/src/ex_eval.c
index e1c28899e1..68dc6d78ca 100644
--- a/src/ex_eval.c
+++ b/src/ex_eval.c
@@ -1173,7 +1173,8 @@ ex_else(exarg_T *eap)
{
// When skipping we ignore most errors, but a missing expression is
// wrong, perhaps it should have been "else".
- if (skip && ends_excmd(*eap->arg))
+ // A double quote here is the start of a string, not a comment.
+ if (skip && *eap->arg != '"' && ends_excmd(*eap->arg))
semsg(_(e_invalid_expression_str), eap->arg);
else
result = eval_to_bool(eap->arg, &error, eap, skip, FALSE);