mirror of
https://github.com/vim/vim.git
synced 2025-10-04 05:25:06 -04:00
patch 8.1.1915: more functions can be used as methods
Problem: More functions can be used as methods. Solution: Make various functions usable as a method.
This commit is contained in:
@@ -674,7 +674,7 @@ func Test_diff_hlID()
|
||||
call diff_hlID(1, 2)->synIDattr("name")->assert_equal("DiffText")
|
||||
call diff_hlID(2, 1)->synIDattr("name")->assert_equal("")
|
||||
call diff_hlID(3, 1)->synIDattr("name")->assert_equal("DiffAdd")
|
||||
call diff_hlID(4, 1)->synIDattr("name")->assert_equal("")
|
||||
eval 4->diff_hlID(1)->synIDattr("name")->assert_equal("")
|
||||
|
||||
wincmd w
|
||||
call assert_equal(synIDattr(diff_hlID(1, 1), "name"), "DiffChange")
|
||||
@@ -693,7 +693,7 @@ func Test_diff_filler()
|
||||
diffthis
|
||||
redraw
|
||||
|
||||
call assert_equal([0, 0, 0, 0, 0, 0, 0, 1, 0], map(range(-1, 7), 'diff_filler(v:val)'))
|
||||
call assert_equal([0, 0, 0, 0, 0, 0, 0, 1, 0], map(range(-1, 7), 'v:val->diff_filler()'))
|
||||
wincmd w
|
||||
call assert_equal([0, 0, 0, 0, 2, 0, 0, 0], map(range(-1, 6), 'diff_filler(v:val)'))
|
||||
|
||||
|
Reference in New Issue
Block a user