aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/syntax_conceal_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-03-17 09:44:10 +0800
committerGitHub <noreply@github.com>2024-03-17 09:44:10 +0800
commitc52dfb6e840827a2de713e40ea8506491ec7ce0b (patch)
treee1fc46dfda47005588439c769cc4e75a51a08ca3 /test/functional/ui/syntax_conceal_spec.lua
parentd114dbe9f79c1382298b04319b7ded88e95e3ee8 (diff)
downloadrneovim-c52dfb6e840827a2de713e40ea8506491ec7ce0b.tar.gz
rneovim-c52dfb6e840827a2de713e40ea8506491ec7ce0b.tar.bz2
rneovim-c52dfb6e840827a2de713e40ea8506491ec7ce0b.zip
fix(normal): don't check conceal when pressing 'r' (#27892)
Problem: Cursor line is unconcealed when pressing 'r' in Normal mode when 'concealcursor' contains 'n' but not 'i'. Solution: Don't check conceal when pressing 'r' in Normal mode. Vim doesn't have this problem because it doesn't call redrawWinline() in conceal_check_cursor_line() and instead sets a global variable.
Diffstat (limited to 'test/functional/ui/syntax_conceal_spec.lua')
-rw-r--r--test/functional/ui/syntax_conceal_spec.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/ui/syntax_conceal_spec.lua b/test/functional/ui/syntax_conceal_spec.lua
index 5afc7dfe6c..ccf758bc07 100644
--- a/test/functional/ui/syntax_conceal_spec.lua
+++ b/test/functional/ui/syntax_conceal_spec.lua
@@ -435,6 +435,18 @@ describe('Screen', function()
{0:~ }|*3
|
]])
+
+ feed('r')
+ screen:expect_unchanged()
+
+ feed('m')
+ screen:expect([[
+ ^moo {1:b} bar {1:b} eggs |
+ foo {1:b} bar {1:b} eggs |*4
+ |
+ {0:~ }|*3
+ |
+ ]])
end)
it('and open line', function()