< (int)(Rows - cmdline_row - 1) * Columns + sc_col)
set_keep_msg((char_u *)s, 0);
+ need_fileinfo = FALSE;
+
vim_free(buf);
--entered;
return retval;
int did_return = FALSE;
if (!msg_silent)
+ {
VIM_CLEAR(keep_msg);
+ need_fileinfo = FALSE;
+ }
#ifdef FEAT_EVAL
if (need_clr_eos)
msg_puts_printf((char_u *)str, maxlen);
else
msg_puts_display((char_u *)str, maxlen, attr, FALSE);
+
+ need_fileinfo = FALSE;
}
/*
call assert_equal("function('CountSpaces', [{'ccccccccccc': ['ab', 'cd'], 'aaaaaaaaaaa': v:false, 'bbbbbbbbbbbb': ''}])", string(function('CountSpaces', [#{aaaaaaaaaaa: v:false, bbbbbbbbbbbb: '', ccccccccccc: ['ab', 'cd']}])))
endfunc
+" Message output was previously overwritten by the fileinfo display, shown
+" when switching buffers. If a buffer is switched to, then a message if
+" echoed, we should show the message, rather than overwriting it with
+" fileinfo.
+func Test_fileinfo_after_echo()
+ CheckScreendump
+
+ let content =<< trim END
+ file a.txt
+
+ hide edit b.txt
+ call setline(1, "hi")
+ setlocal modified
+
+ hide buffer a.txt
+
+ set updatetime=1
+ autocmd CursorHold * b b.txt | w | echo "'b' written"
+ END
+
+ call writefile(content, 'Xtest_fileinfo_after_echo')
+ let buf = RunVimInTerminal('-S Xtest_fileinfo_after_echo', #{rows: 6})
+ call VerifyScreenDump(buf, 'Test_fileinfo_after_echo', {})
+
+ call term_sendkeys(buf, ":q\<CR>")
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('Xtest_fileinfo_after_echo')
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab