aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/terminal/cursor_spec.lua26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/functional/terminal/cursor_spec.lua b/test/functional/terminal/cursor_spec.lua
index 83408e41b3..a824893ce3 100644
--- a/test/functional/terminal/cursor_spec.lua
+++ b/test/functional/terminal/cursor_spec.lua
@@ -357,6 +357,32 @@ describe(':terminal cursor', function()
eq(error_hl_id, screen._mode_info[terminal_mode_idx].hl_id)
end)
+
+ it('restores visibility on TermLeave #32456', function()
+ skip(is_os('win'), '#31587')
+ feed([[<C-\><C-N>]]) -- Exit terminal mode
+ screen:expect([[
+ tty ready |
+ ^ |
+ |*5
+ ]])
+
+ tt.hide_cursor()
+ -- :startinsert repros the issue more reliably than feed('i')
+ command('mode | startinsert')
+ screen:expect([[
+ tty ready |
+ |*5
+ {3:-- TERMINAL --} |
+ ]])
+
+ feed([[<C-\><C-N>]]) -- Exit terminal mode
+ screen:expect([[
+ tty ready |
+ ^ |
+ |*5
+ ]])
+ end)
end)
describe('buffer cursor position is correct in terminal without number column', function()