aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r--src/nvim/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c
index 81621b0d80..128d1a784c 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -681,10 +681,10 @@ main_loop (
if (keep_msg != NULL) {
char_u *p;
- /* msg_attr_keep() will set keep_msg to NULL, must free the
- * string here. */
+ // msg_attr_keep() will set keep_msg to NULL, must free the string
+ // here. Don't reset keep_msg, msg_attr_keep() uses it to check for
+ // duplicates.
p = keep_msg;
- keep_msg = NULL;
msg_attr(p, keep_msg_attr);
free(p);
}