aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/eval.c7
-rw-r--r--src/nvim/testdir/test_cmdline.vim10
2 files changed, 17 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index d8d785395c..a7773e7c5e 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -19528,6 +19528,13 @@ void ex_execute(exarg_T *eap)
}
if (ret != FAIL && ga.ga_data != NULL) {
+ if (eap->cmdidx == CMD_echomsg || eap->cmdidx == CMD_echoerr) {
+ // Mark the already 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 (eap->cmdidx == CMD_echomsg) {
MSG_ATTR(ga.ga_data, echo_attr);
ui_flush();
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim
index a998bd90f1..5a43838218 100644
--- a/src/nvim/testdir/test_cmdline.vim
+++ b/src/nvim/testdir/test_cmdline.vim
@@ -430,4 +430,14 @@ func Test_getcmdtype()
cunmap <F6>
endfunc
+func Test_verbosefile()
+ set verbosefile=Xlog
+ echomsg 'foo'
+ echomsg 'bar'
+ set verbosefile=
+ let log = readfile('Xlog')
+ call assert_match("foo\nbar", join(log, "\n"))
+ call delete('Xlog')
+endfunc
+
set cpo&