diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-07-13 09:06:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-13 09:06:31 +0800 |
commit | c01690b1eaa4ad55cea3ec48a0b5381180ebe970 (patch) | |
tree | 2ddb5c2c74aa6edcb716fa8635b8250f266c5d3e /test/functional/ui/messages_spec.lua | |
parent | 39d51c833aed7e2ab946cd51bfff8d981269a8ef (diff) | |
download | rneovim-c01690b1eaa4ad55cea3ec48a0b5381180ebe970.tar.gz rneovim-c01690b1eaa4ad55cea3ec48a0b5381180ebe970.tar.bz2 rneovim-c01690b1eaa4ad55cea3ec48a0b5381180ebe970.zip |
fix(exmode): flush messages before printing a line after pressing Enter (#19341)
Diffstat (limited to 'test/functional/ui/messages_spec.lua')
-rw-r--r-- | test/functional/ui/messages_spec.lua | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua index e9c0e1b2a1..00f126a1f2 100644 --- a/test/functional/ui/messages_spec.lua +++ b/test/functional/ui/messages_spec.lua @@ -1196,6 +1196,53 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim {4:Press ENTER or type command to continue}^ | ]]} end) + + it('prints lines in Ex mode correctly with a burst of carriage returns #19341', function() + command('set number') + meths.buf_set_lines(0, 0, 0, true, {'aaa', 'bbb', 'ccc'}) + command('set display-=msgsep') + feed('gggQ<CR><CR>1<CR><CR>vi') + screen:expect([[ + Entering Ex mode. Type "visual" to go to Normal mode. | + {11: 2 }bbb | + {11: 3 }ccc | + :1 | + {11: 1 }aaa | + {11: 2 }bbb | + :vi^ | + ]]) + feed('<CR>') + screen:expect([[ + {11: 1 }aaa | + {11: 2 }^bbb | + {11: 3 }ccc | + {11: 4 } | + {1:~ }| + {1:~ }| + | + ]]) + command('set display+=msgsep') + feed('gggQ<CR><CR>1<CR><CR>vi') + screen:expect([[ + Entering Ex mode. Type "visual" to go to Normal mode. | + {11: 2 }bbb | + {11: 3 }ccc | + :1 | + {11: 1 }aaa | + {11: 2 }bbb | + :vi^ | + ]]) + feed('<CR>') + screen:expect([[ + {11: 1 }aaa | + {11: 2 }^bbb | + {11: 3 }ccc | + {11: 4 } | + {1:~ }| + {1:~ }| + | + ]]) + end) end) describe('ui/ext_messages', function() |