aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/messages_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-30 21:41:03 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-03-31 10:05:26 +0800
commitd5dee83552033506a308cac999a8c9f08e98e6b1 (patch)
tree7bf12442faf6d9a22f3ce96c2369a02d7879d85f /test/functional/legacy/messages_spec.lua
parente2247c0baa78570f7cb81695c28394ce0be73825 (diff)
downloadrneovim-d5dee83552033506a308cac999a8c9f08e98e6b1.tar.gz
rneovim-d5dee83552033506a308cac999a8c9f08e98e6b1.tar.bz2
rneovim-d5dee83552033506a308cac999a8c9f08e98e6b1.zip
vim-patch:8.2.4156: fileinfo message overwrites echo'ed message
Problem: Fileinfo message overwrites echo'ed message. Solution: Reset need_fileinfo when displaying a message. (Rob Pilling, closes vim/vim#9569) https://github.com/vim/vim/commit/726f7f91fd17e3e7eb39614a20d10ea83c134df0
Diffstat (limited to 'test/functional/legacy/messages_spec.lua')
-rw-r--r--test/functional/legacy/messages_spec.lua31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/functional/legacy/messages_spec.lua b/test/functional/legacy/messages_spec.lua
index 330d70e7d4..335b269ad7 100644
--- a/test/functional/legacy/messages_spec.lua
+++ b/test/functional/legacy/messages_spec.lua
@@ -2,6 +2,7 @@ local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen')
local clear = helpers.clear
local command = helpers.command
+local exec = helpers.exec
local feed = helpers.feed
before_each(clear)
@@ -35,4 +36,34 @@ describe('messages', function()
|
]])
end)
+
+ it('fileinfo does not overwrite echo message vim-patch:8.2.4156', function()
+ local screen = Screen.new(40, 6)
+ screen:set_default_attr_ids({
+ [1] = {bold = true, foreground = Screen.colors.Blue}, -- NonText
+ })
+ screen:attach()
+ exec([[
+ set shortmess-=F
+
+ 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"
+ ]])
+ screen:expect([[
+ ^hi |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ 'b' written |
+ ]])
+ end)
end)