mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 8.0.0672: third item of synconcealed() changes too often
Problem: Third item of synconcealed() changes too often. (Dominique Pelle) Solution: Reset the sequence number at the start of each line.
This commit is contained in:
@@ -474,24 +474,24 @@ func Test_conceal()
|
||||
|
||||
set conceallevel=0
|
||||
call assert_equal('123456 ', ScreenLines(2, 7)[0])
|
||||
call assert_equal([[0, ''], [0, ''], [0, ''], [0, ''], [0, ''], [0, '']], map(range(1, 6), 'synconcealed(2, v:val)[0:1]'))
|
||||
call assert_equal([[0, '', 0], [0, '', 0], [0, '', 0], [0, '', 0], [0, '', 0], [0, '', 0]], map(range(1, 6), 'synconcealed(2, v:val)'))
|
||||
|
||||
set conceallevel=1
|
||||
call assert_equal('1X 6 ', ScreenLines(2, 7)[0])
|
||||
call assert_equal([[0, ''], [1, 'X'], [1, 'X'], [1, ' '], [1, ' '], [0, '']], map(range(1, 6), 'synconcealed(2, v:val)[0:1]'))
|
||||
call assert_equal([[0, '', 0], [1, 'X', 1], [1, 'X', 1], [1, ' ', 2], [1, ' ', 2], [0, '', 0]], map(range(1, 6), 'synconcealed(2, v:val)'))
|
||||
|
||||
set conceallevel=1
|
||||
set listchars=conceal:Y
|
||||
call assert_equal([[0, ''], [1, 'X'], [1, 'X'], [1, 'Y'], [1, 'Y'], [0, '']], map(range(1, 6), 'synconcealed(2, v:val)[0:1]'))
|
||||
call assert_equal([[0, '', 0], [1, 'X', 1], [1, 'X', 1], [1, 'Y', 2], [1, 'Y', 2], [0, '', 0]], map(range(1, 6), 'synconcealed(2, v:val)'))
|
||||
call assert_equal('1XY6 ', ScreenLines(2, 7)[0])
|
||||
|
||||
set conceallevel=2
|
||||
call assert_match('1X6 ', ScreenLines(2, 7)[0])
|
||||
call assert_equal([[0, ''], [1, 'X'], [1, 'X'], [1, ''], [1, ''], [0, '']], map(range(1, 6), 'synconcealed(2, v:val)[0:1]'))
|
||||
call assert_equal([[0, '', 0], [1, 'X', 1], [1, 'X', 1], [1, '', 2], [1, '', 2], [0, '', 0]], map(range(1, 6), 'synconcealed(2, v:val)'))
|
||||
|
||||
set conceallevel=3
|
||||
call assert_match('16 ', ScreenLines(2, 7)[0])
|
||||
call assert_equal([[0, ''], [1, ''], [1, ''], [1, ''], [1, ''], [0, '']], map(range(1, 6), 'synconcealed(2, v:val)[0:1]'))
|
||||
call assert_equal([[0, '', 0], [1, '', 1], [1, '', 1], [1, '', 2], [1, '', 2], [0, '', 0]], map(range(1, 6), 'synconcealed(2, v:val)'))
|
||||
|
||||
syn clear
|
||||
set conceallevel&
|
||||
|
Reference in New Issue
Block a user