0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

patch 8.1.1809: more functions can be used as a method

Problem:    More functions can be used as a method.
Solution:   Add has_key(), split(), str2list(), etc.
This commit is contained in:
Bram Moolenaar
2019-08-04 17:35:53 +02:00
parent e4ce825a55
commit a74e4946de
7 changed files with 76 additions and 13 deletions

View File

@@ -668,13 +668,13 @@ func Test_diff_hlID()
diffthis
redraw
call assert_equal(synIDattr(diff_hlID(-1, 1), "name"), "")
call diff_hlID(-1, 1)->synIDattr("name")->assert_equal("")
call assert_equal(synIDattr(diff_hlID(1, 1), "name"), "DiffChange")
call assert_equal(synIDattr(diff_hlID(1, 2), "name"), "DiffText")
call assert_equal(synIDattr(diff_hlID(2, 1), "name"), "")
call assert_equal(synIDattr(diff_hlID(3, 1), "name"), "DiffAdd")
call assert_equal(synIDattr(diff_hlID(4, 1), "name"), "")
call diff_hlID(1, 1)->synIDattr("name")->assert_equal("DiffChange")
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("")
wincmd w
call assert_equal(synIDattr(diff_hlID(1, 1), "name"), "DiffChange")