aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-05-03 07:54:17 +0800
committerGitHub <noreply@github.com>2023-05-03 07:54:17 +0800
commit1975062d3cd9775a6bdecbf471aa5f8b281692b1 (patch)
treeb73916b8ed12450ac7b5d86ca807be40639dead8 /test/functional
parent62ecb05957f43b140e7dd874e1f84e3a6fa99838 (diff)
downloadrneovim-1975062d3cd9775a6bdecbf471aa5f8b281692b1.tar.gz
rneovim-1975062d3cd9775a6bdecbf471aa5f8b281692b1.tar.bz2
rneovim-1975062d3cd9775a6bdecbf471aa5f8b281692b1.zip
vim-patch:9.0.0662: concealed characters do not work correctly (#23454)
Problem: Concealed characters do not work correctly. Solution: Subtract boguscols instead of adding them. (closes vim/vim#11273) https://github.com/vim/vim/commit/75008661821eee6989476908feaf64a9dea03e05 Code change is N/A as Nvim has a draw_col variable instead. Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/legacy/conceal_spec.lua33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/functional/legacy/conceal_spec.lua b/test/functional/legacy/conceal_spec.lua
index 429cf9dc03..6aaa93f886 100644
--- a/test/functional/legacy/conceal_spec.lua
+++ b/test/functional/legacy/conceal_spec.lua
@@ -474,6 +474,39 @@ describe('Conceal', function()
]])
end)
+ -- oldtest: Test_conceal_linebreak()
+ it('with linebreak', function()
+ local screen = Screen.new(75, 8)
+ screen:set_default_attr_ids({
+ [0] = {bold = true, foreground = Screen.colors.Blue}, -- NonText
+ })
+ screen:attach()
+ exec([[
+ let &wrap = v:true
+ let &conceallevel = 2
+ let &concealcursor = 'nc'
+ let &linebreak = v:true
+ let &showbreak = '+ '
+ let line = 'a`a`a`a`'
+ \ .. 'a'->repeat(&columns - 15)
+ \ .. ' b`b`'
+ \ .. 'b'->repeat(&columns - 10)
+ \ .. ' cccccc'
+ eval ['x'->repeat(&columns), '', line]->setline(1)
+ syntax region CodeSpan matchgroup=Delimiter start=/\z(`\+\)/ end=/\z1/ concealends
+ ]])
+ screen:expect([[
+ ^xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
+ |
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
+ {0:+ }bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
+ {0:+ }cccccc |
+ {0:~ }|
+ {0:~ }|
+ |
+ ]])
+ end)
+
-- Tests for correct display (cursor column position) with +conceal and tabulators.
-- oldtest: Test_conceal_cursor_pos()
it('cursor and column position with conceal and tabulators', function()