0
0
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:
Bram Moolenaar
2019-08-23 22:31:37 +02:00
parent d019039ccd
commit 1a3a89168d
12 changed files with 84 additions and 31 deletions

View File

@@ -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)'))