aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/options.lua4
-rw-r--r--test/functional/editor/mode_normal_spec.lua22
2 files changed, 24 insertions, 2 deletions
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
index 296b78bd15..6e2b015228 100644
--- a/src/nvim/options.lua
+++ b/src/nvim/options.lua
@@ -9785,7 +9785,7 @@ return {
UI-dependent. Works best with RGB colors. 'termguicolors'
]=],
full_name = 'winblend',
- redraw = { 'current_window' },
+ redraw = { 'current_window', 'highlight_only' },
scope = { 'window' },
short_desc = N_('Controls transparency level for floating windows'),
type = 'number',
@@ -9900,7 +9900,7 @@ return {
expand_cb = 'expand_set_winhighlight',
full_name = 'winhighlight',
list = 'onecommacolon',
- redraw = { 'current_window' },
+ redraw = { 'current_window', 'highlight_only' },
scope = { 'window' },
short_desc = N_('Setup window-local highlights'),
type = 'string',
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)