aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/cursor_spec.lua
diff options
context:
space:
mode:
authorGregory Anders <greg@gpanders.com>2024-12-23 15:39:36 -0600
committerGitHub <noreply@github.com>2024-12-23 15:39:36 -0600
commitc51bf5a6b24928ac04d0bb129b1b424d4c78f28d (patch)
tree19305813a756cbbca90ffa101ec69dd6fcadd567 /test/functional/terminal/cursor_spec.lua
parent4cbeb6fa3cc764fd5605bccf7362f7a249d6df81 (diff)
downloadrneovim-c51bf5a6b24928ac04d0bb129b1b424d4c78f28d.tar.gz
rneovim-c51bf5a6b24928ac04d0bb129b1b424d4c78f28d.tar.bz2
rneovim-c51bf5a6b24928ac04d0bb129b1b424d4c78f28d.zip
fix(terminal): set cursor cell percentage (#31703)
Fixes: https://github.com/neovim/neovim/issues/31685
Diffstat (limited to 'test/functional/terminal/cursor_spec.lua')
-rw-r--r--test/functional/terminal/cursor_spec.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/functional/terminal/cursor_spec.lua b/test/functional/terminal/cursor_spec.lua
index 8594a9ce16..12a20ddc0d 100644
--- a/test/functional/terminal/cursor_spec.lua
+++ b/test/functional/terminal/cursor_spec.lua
@@ -152,7 +152,7 @@ describe(':terminal cursor', function()
end)
end)
- it('can be modified by application #3681', function()
+ it('can be modified by application #3681 #31685', function()
skip(is_os('win'), '#31587')
local states = {
@@ -181,7 +181,15 @@ describe(':terminal cursor', function()
eq(0, screen._mode_info[terminal_mode_idx].blinkon)
eq(0, screen._mode_info[terminal_mode_idx].blinkoff)
end
+
eq(v.shape, screen._mode_info[terminal_mode_idx].cursor_shape)
+
+ -- Cell percentages are hard coded for each shape in terminal.c
+ if v.shape == 'horizontal' then
+ eq(20, screen._mode_info[terminal_mode_idx].cell_percentage)
+ elseif v.shape == 'vertical' then
+ eq(25, screen._mode_info[terminal_mode_idx].cell_percentage)
+ end
end,
})
end