diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-04-20 08:12:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-20 08:12:45 +0800 |
commit | 4d52b0cf670502caf81b70f2f1e6f8c548b78f58 (patch) | |
tree | 68dd42e89cf0bbcae4f406bd325d50f96efc6d36 /test/functional/editor | |
parent | 52d2851ca4e747146c30e1996c08bf504d99fe95 (diff) | |
download | rneovim-4d52b0cf670502caf81b70f2f1e6f8c548b78f58.tar.gz rneovim-4d52b0cf670502caf81b70f2f1e6f8c548b78f58.tar.bz2 rneovim-4d52b0cf670502caf81b70f2f1e6f8c548b78f58.zip |
fix(showcmd): clear the rest properly (#28420)
Diffstat (limited to 'test/functional/editor')
-rw-r--r-- | test/functional/editor/mode_normal_spec.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/functional/editor/mode_normal_spec.lua b/test/functional/editor/mode_normal_spec.lua index 8790cbe8a8..b80723a5b9 100644 --- a/test/functional/editor/mode_normal_spec.lua +++ b/test/functional/editor/mode_normal_spec.lua @@ -1,6 +1,7 @@ -- Normal mode tests. local t = require('test.functional.testutil')() +local Screen = require('test.functional.ui.screen') local clear = t.clear local feed = t.feed local fn = t.fn @@ -19,4 +20,23 @@ describe('Normal mode', function() feed('k') eq(pos, fn.getcurpos()) end) + + it('&showcmd does not crash with :startinsert #28419', function() + local screen = Screen.new(60, 17) + screen:attach() + fn.termopen( + { t.nvim_prog, '--clean', '--cmd', 'startinsert' }, + { env = { VIMRUNTIME = os.getenv('VIMRUNTIME') } } + ) + screen:expect({ + grid = [[ + ^ | + ~ |*13 + [No Name] 0,1 All| + -- INSERT -- | + | + ]], + attr_ids = {}, + }) + end) end) |