aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/syntax_conceal_spec.lua
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-10-02 03:51:46 +0200
committerDaniel Hahler <git@thequod.de>2019-10-03 07:47:40 +0200
commitd453d2c484568bec7f467d48668e3f4bafc86091 (patch)
tree6f90c935a21b89209ae0fc53f1a7b49564b32577 /test/functional/ui/syntax_conceal_spec.lua
parentc5d1b0f3da4af9100d0337d6753b7268e591d320 (diff)
downloadrneovim-d453d2c484568bec7f467d48668e3f4bafc86091.tar.gz
rneovim-d453d2c484568bec7f467d48668e3f4bafc86091.tar.bz2
rneovim-d453d2c484568bec7f467d48668e3f4bafc86091.zip
[release-0.4] Fix redraw regression with w_p_cole in visual mode
Fixes https://github.com/neovim/neovim/issues/11024, regressed in 23c71d51. Closes https://github.com/neovim/neovim/pull/11120.
Diffstat (limited to 'test/functional/ui/syntax_conceal_spec.lua')
-rw-r--r--test/functional/ui/syntax_conceal_spec.lua46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/functional/ui/syntax_conceal_spec.lua b/test/functional/ui/syntax_conceal_spec.lua
index 00e94ef94b..7079b43414 100644
--- a/test/functional/ui/syntax_conceal_spec.lua
+++ b/test/functional/ui/syntax_conceal_spec.lua
@@ -17,6 +17,7 @@ describe('Screen', function()
[3] = {reverse = true},
[4] = {bold = true},
[5] = {background = Screen.colors.Yellow},
+ [6] = {background = Screen.colors.LightGrey},
} )
end)
@@ -823,5 +824,50 @@ describe('Screen', function()
]])
end)
end)
+
+ it('redraws properly with concealcursor in visual mode', function()
+ command('set concealcursor=v conceallevel=2')
+
+ feed('10Ofoo barf bar barf eggs<esc>')
+ feed(':3<cr>o a<Esc>ggV')
+ screen:expect{grid=[[
+ ^f{6:oo }{1:b}{6: bar }{1:b}{6: eggs} |
+ foo {1:b} bar {1:b} eggs |
+ foo {1:b} bar {1:b} eggs |
+ a |
+ foo {1:b} bar {1:b} eggs |
+ foo {1:b} bar {1:b} eggs |
+ foo {1:b} bar {1:b} eggs |
+ foo {1:b} bar {1:b} eggs |
+ foo {1:b} bar {1:b} eggs |
+ {4:-- VISUAL LINE --} |
+ ]]}
+ feed(string.rep('j', 15))
+ screen:expect{grid=[[
+ {6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
+ {6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
+ {6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
+ {6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
+ {6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
+ {6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
+ {6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
+ {6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
+ ^f{6:oo }{1:b}{6: bar }{1:b}{6: eggs} |
+ {4:-- VISUAL LINE --} |
+ ]]}
+ feed(string.rep('k', 15))
+ screen:expect{grid=[[
+ ^f{6:oo }{1:b}{6: bar }{1:b}{6: eggs} |
+ foo {1:b} bar {1:b} eggs |
+ foo {1:b} bar {1:b} eggs |
+ a |
+ foo {1:b} bar {1:b} eggs |
+ foo {1:b} bar {1:b} eggs |
+ foo {1:b} bar {1:b} eggs |
+ foo {1:b} bar {1:b} eggs |
+ foo {1:b} bar {1:b} eggs |
+ {4:-- VISUAL LINE --} |
+ ]]}
+ end)
end)
end)