diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-03-18 22:25:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-18 22:25:55 +0800 |
commit | e3bd04f2aff738722c06276cc926d4bdd4501402 (patch) | |
tree | 2bd22e459f73952bc4e72a4e70af2d8069e07ca9 /src/nvim/eval.c | |
parent | 5de0482d1abfdc0a4ede1b96f729dae38f1c7c56 (diff) | |
download | rneovim-e3bd04f2aff738722c06276cc926d4bdd4501402.tar.gz rneovim-e3bd04f2aff738722c06276cc926d4bdd4501402.tar.bz2 rneovim-e3bd04f2aff738722c06276cc926d4bdd4501402.zip |
fix(pager): handle consecutive newlines properly (#27913)
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index e4ee254193..f5f9c4f77b 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -8085,10 +8085,12 @@ void ex_echo(exarg_T *eap) // Call msg_start() after eval1(), evaluating the expression // may cause a message to appear. if (eap->cmdidx == CMD_echo) { - // Mark the saved text as finishing the line, so that what - // follows is displayed on a new line when scrolling back - // at the more prompt. - msg_sb_eol(); + if (!msg_didout) { + // Mark the saved text as finishing the line, so that what + // follows is displayed on a new line when scrolling back + // at the more prompt. + msg_sb_eol(); + } msg_start(); } } else if (eap->cmdidx == CMD_echo) { |