aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-02-18 18:11:20 +0800
committerGitHub <noreply@github.com>2024-02-18 18:11:20 +0800
commit796df966f3cb83698035b85522504d40e7b5ab0b (patch)
treeb59060675bc0996858591abcfe4b468127aa47ee /test
parenteb8a3e0575d36ebfee1e401db0a064763cf684cd (diff)
downloadrneovim-796df966f3cb83698035b85522504d40e7b5ab0b.tar.gz
rneovim-796df966f3cb83698035b85522504d40e7b5ab0b.tar.bz2
rneovim-796df966f3cb83698035b85522504d40e7b5ab0b.zip
fix(options): don't update curswant for 'winhl' or 'winbl' (#27515)
Diffstat (limited to 'test')
-rw-r--r--test/functional/editor/mode_normal_spec.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/editor/mode_normal_spec.lua b/test/functional/editor/mode_normal_spec.lua
new file mode 100644
index 0000000000..89bab3f6c9
--- /dev/null
+++ b/test/functional/editor/mode_normal_spec.lua
@@ -0,0 +1,22 @@
+-- Normal mode tests.
+
+local helpers = require('test.functional.helpers')(after_each)
+local clear = helpers.clear
+local feed = helpers.feed
+local fn = helpers.fn
+local command = helpers.command
+local eq = helpers.eq
+
+describe('Normal mode', function()
+ before_each(clear)
+
+ it('setting &winhighlight or &winblend does not change curswant #27470', function()
+ fn.setline(1, { 'long long lone line', 'short line' })
+ feed('ggfi')
+ local pos = fn.getcurpos()
+ feed('j')
+ command('setlocal winblend=10 winhighlight=Visual:Search')
+ feed('k')
+ eq(pos, fn.getcurpos())
+ end)
+end)