fix(options): don't update curswant for 'winhl' or 'winbl' (#27515)

This commit is contained in:
zeertzjq
2024-02-18 18:11:20 +08:00
committed by GitHub
parent eb8a3e0575
commit 796df966f3
2 changed files with 24 additions and 2 deletions

View File

@@ -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)