diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-11-17 22:13:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-17 22:13:30 +0800 |
commit | ad867fee26c8124d23693823b56f849e4487b828 (patch) | |
tree | 9b8b0f15803cd33550b0ac6bf3a2109a3b14ba1d /test | |
parent | 677be4bdd224f25519d9072a923d2c707842c6ad (diff) | |
download | rneovim-ad867fee26c8124d23693823b56f849e4487b828.tar.gz rneovim-ad867fee26c8124d23693823b56f849e4487b828.tar.bz2 rneovim-ad867fee26c8124d23693823b56f849e4487b828.zip |
fix(tui): handle cursor visibility properly (#26091)
The test is for the case without 'termsync' because libvterm doesn't
support synchronized output, and it passes without this PR.
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/terminal/tui_spec.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua index 960870fb46..b17eed00f9 100644 --- a/test/functional/terminal/tui_spec.lua +++ b/test/functional/terminal/tui_spec.lua @@ -1785,6 +1785,31 @@ describe('TUI', function() {3:-- TERMINAL --} | ]]) end) + + it('supports hiding cursor', function() + child_session:request('nvim_command', + "let g:id = jobstart([v:progpath, '--clean', '--headless'])") + feed_data(':call jobwait([g:id])\n') + screen:expect([[ + | + {4:~ }| + {4:~ }| + {4:~ }| + {5:[No Name] }| + :call jobwait([g:id]) | + {3:-- TERMINAL --} | + ]]) + feed_data('\003') + screen:expect([[ + {1: } | + {4:~ }| + {4:~ }| + {4:~ }| + {5:[No Name] }| + Type :qa and press <Enter> to exit Nvim | + {3:-- TERMINAL --} | + ]]) + end) end) describe('TUI', function() |