Patch 8.1.1925
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
Files: runtime/doc/eval.txt, src/evalfunc.c,
src/testdir/test_bufline.vim, src/testdir/test_bufwintabinfo.vim,
src/testdir/test_cd.vim, src/testdir/test_changelist.vim,
src/testdir/test_cmdline.vim, src/testdir/test_edit.vim,
src/testdir/test_environ.vim, src/testdir/test_file_perm.vim,
src/testdir/test_getvar.vim, src/testdir/test_jumplist.vim,
src/testdir/test_put.vim, src/testdir/test_stat.vim
*** ../vim-8.1.1924/runtime/doc/eval.txt 2019-08-24 22:14:52.826215824 +0200
--- runtime/doc/eval.txt 2019-08-24 22:51:08.869587879 +0200
***************
*** 2445,2451 ****
List lines {lnum} to {end} of buffer {expr}
getbufvar({expr}, {varname} [, {def}])
any variable {varname} in buffer {expr}
! getchangelist({expr}) List list of change list items
getchar([expr]) Number get one character from the user
getcharmod() Number modifiers for the last typed character
getcharsearch() Dict last character search
--- 2450,2456 ----
List lines {lnum} to {end} of buffer {expr}
getbufvar({expr}, {varname} [, {def}])
any variable {varname} in buffer {expr}
! getchangelist([{expr}]) List list of change list items
getchar([expr]) Number get one character from the user
getcharmod() Number modifiers for the last typed character
getcharsearch() Dict last character search
***************
*** 4808,4813 ****
--- 4816,4824 ----
Example: >
:let lines = getbufline(bufnr("myfile"), 1, "$")
+ < Can also be used as a |method|: >
+ GetBufnr()->getbufline(lnum)
+
getbufvar({expr}, {varname} [, {def}]) *getbufvar()*
The result is the value of option or local buffer variable
{varname} in buffer {expr}. Note that the name without "b:"
***************
*** 4827,4834 ****
Examples: >
:let bufmodified = getbufvar(1, "&mod")
:echo "todo myvar = " . getbufvar("todo", "myvar")
<
! getchangelist({expr}) *getchangelist()*
Returns the |changelist| for the buffer {expr}. For the use
of {expr}, see |bufname()| above. If buffer {expr} doesn't
exist, an empty list is returned.
--- 4838,4848 ----
Examples: >
:let bufmodified = getbufvar(1, "&mod")
:echo "todo myvar = " . getbufvar("todo", "myvar")
+
+ < Can also be used as a |method|: >
+ GetBufnr()->getbufvar(varname)
<
! getchangelist([{expr}]) *getchangelist()*
Returns the |changelist| for the buffer {expr}. For the use
of {expr}, see |bufname()| above. If buffer {expr} doesn't
exist, an empty list is returned.
***************
*** 4844,4849 ****
--- 4858,4866 ----
position refers to the position in the list. For other
buffers, it is set to the length of the list.
+ Can also be used as a |method|: >
+ GetBufnr()->getchangelist()
+
getchar([expr]) *getchar()*
Get a single character from the user or input stream.
If [expr] is omitted, wait until a character is available.
***************
*** 5043,5048 ****
--- 5060,5068 ----
If there are no matches, an empty list is returned. An
invalid value for {type} produces an error.
+ Can also be used as a |method|: >
+ GetPattern()->getcompletion('color')
+ <
*getcurpos()*
getcurpos() Get the position of the cursor. This is like getpos('.'), but
includes an extra item in the list:
***************
*** 5089,5100 ****
:echo getcwd(-1, 3)
" Get the working directory of current tabpage
:echo getcwd(-1, 0)
<
getenv({name}) *getenv()*
Return the value of environment variable {name}.
When the variable does not exist |v:null| is returned. That
! is different from a variable set to an empty string.
! See also |expr-env|.
getfontname([{name}]) *getfontname()*
Without an argument returns the name of the normal font being
--- 5109,5127 ----
:echo getcwd(-1, 3)
" Get the working directory of current tabpage
:echo getcwd(-1, 0)
+
+ < Can also be used as a |method|: >
+ GetWinnr()->getcwd()
<
getenv({name}) *getenv()*
Return the value of environment variable {name}.
When the variable does not exist |v:null| is returned. That
! is different from a variable set to an empty string, although
! some systems interpret the empty value as the variable being
! deleted. See also |expr-env|.
!
! Can also be used as a |method|: >
! GetVarname()->getenv()
getfontname([{name}]) *getfontname()*
Without an argument returns the name of the normal font being
***************
*** 5125,5130 ****
--- 5152,5160 ----
< This will hopefully (from a security point of view) display
the string "rw-r--r--" or even "rw-------".
+ Can also be used as a |method|: >
+ GetFilename()->getfperm()
+ <
For setting permissions use |setfperm()|.
getfsize({fname}) *getfsize()*
***************
*** 5135,5140 ****
--- 5165,5173 ----
If the size of {fname} is too big to fit in a Number then -2
is returned.
+ Can also be used as a |method|: >
+ GetFilename()->getfsize()
+
getftime({fname}) *getftime()*
The result is a Number, which is the last modification time of
the given file {fname}. The value is measured as seconds
***************
*** 5142,5147 ****
--- 5175,5183 ----
|localtime()| and |strftime()|.
If the file {fname} can't be found -1 is returned.
+ Can also be used as a |method|: >
+ GetFilename()->getftime()
+
getftype({fname}) *getftype()*
The result is a String, which is a description of the kind of
file of the given file {fname}.
***************
*** 5163,5168 ****
--- 5199,5207 ----
"file" are returned. On MS-Windows a symbolic link to a
directory returns "dir" instead of "link".
+ Can also be used as a |method|: >
+ GetFilename()->getftype()
+
getjumplist([{winnr} [, {tabnr}]]) *getjumplist()*
Returns the |jumplist| for the specified window.
***************
*** 5182,5188 ****
filename filename if available
lnum line number
! *getline()*
getline({lnum} [, {end}])
Without {end} the result is a String, which is line {lnum}
from the current buffer. Example: >
--- 5221,5230 ----
filename filename if available
lnum line number
! Can also be used as a |method|: >
! GetWinnr()->getjumplist()
!
! < *getline()*
getline({lnum} [, {end}])
Without {end} the result is a String, which is line {lnum}
from the current buffer. Example: >
***************
*** 5205,5210 ****
--- 5247,5255 ----
:let end = search("^$") - 1
:let lines = getline(start, end)
+ < Can also be used as a |method|: >
+ ComputeLnum()->getline()
+
< To get lines from another buffer see |getbufline()|
getloclist({nr} [, {what}]) *getloclist()*
***************
*** 5280,5285 ****
--- 5325,5333 ----
call setpos("'a", save_a_mark)
< Also see |getcurpos()| and |setpos()|.
+ Can also be used as a |method|: >
+ GetMark()->getpos()
+
getqflist([{what}]) *getqflist()*
Returns a list with all the current quickfix errors. Each
***************
*** 5396,5401 ****
--- 5444,5452 ----
If {regname} is not specified, |v:register| is used.
+ Can also be used as a |method|: >
+ GetRegname()->getreg()
+
getregtype([{regname}]) *getregtype()*
The result is a String, which is type of register {regname}.
***************
*** 5407,5412 ****
--- 5458,5466 ----
<CTRL-V> is one character with value 0x16.
If {regname} is not specified, |v:register| is used.
+ Can also be used as a |method|: >
+ GetRegname()->getregtype()
+
gettabinfo([{arg}]) *gettabinfo()*
If {arg} is not specified, then information about all the tab
pages is returned as a List. Each List item is a Dictionary.
***************
*** 5420,5425 ****
--- 5474,5482 ----
tabpage-local variables
windows List of |window-ID|s in the tab page.
+ Can also be used as a |method|: >
+ GetTabnr()->gettabinfo()
+
gettabvar({tabnr}, {varname} [, {def}]) *gettabvar()*
Get the value of a tab-local variable {varname} in tab page
{tabnr}. |t:var|
***************
*** 5430,5435 ****
--- 5487,5495 ----
When the tab or variable doesn't exist {def} or an empty
string is returned, there is no error message.
+ Can also be used as a |method|: >
+ GetTabnr()->gettabvar(varname)
+
gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()*
Get the value of window-local variable {varname} in window
{winnr} in tab page {tabnr}.
***************
*** 5456,5461 ****
--- 5516,5524 ----
To obtain all window-local variables use: >
gettabwinvar({tabnr}, {winnr}, '&')
+ < Can also be used as a |method|: >
+ GetTabnr()->gettabvar(winnr, varname)
+
gettagstack([{nr}]) *gettagstack()*
The result is a Dict, which is the tag stack of window {nr}.
{nr} can be the window number or the |window-ID|.
***************
*** 7996,8001 ****
--- 8060,8068 ----
Returns non-zero for success, zero for failure.
+ Can also be used as a |method|: >
+ GetFilename()->setfperm(mode)
+ <
To read permissions see |getfperm()|.
*** ../vim-8.1.1924/src/evalfunc.c 2019-08-24 22:14:52.826215824 +0200
--- src/evalfunc.c 2019-08-24 22:51:19.501527699 +0200
***************
*** 561,569 ****
{"garbagecollect", 0, 1, 0, f_garbagecollect},
{"get", 2, 3, FEARG_1, f_get},
{"getbufinfo", 0, 1, 0, f_getbufinfo},
! {"getbufline", 2, 3, 0, f_getbufline},
! {"getbufvar", 2, 3, 0, f_getbufvar},
! {"getchangelist", 1, 1, 0, f_getchangelist},
{"getchar", 0, 1, 0, f_getchar},
{"getcharmod", 0, 0, 0, f_getcharmod},
{"getcharsearch", 0, 0, 0, f_getcharsearch},
--- 561,569 ----
{"garbagecollect", 0, 1, 0, f_garbagecollect},
{"get", 2, 3, FEARG_1, f_get},
{"getbufinfo", 0, 1, 0, f_getbufinfo},
! {"getbufline", 2, 3, FEARG_1, f_getbufline},
! {"getbufvar", 2, 3, FEARG_1, f_getbufvar},
! {"getchangelist", 0, 1, FEARG_1, f_getchangelist},
{"getchar", 0, 1, 0, f_getchar},
{"getcharmod", 0, 0, 0, f_getcharmod},
{"getcharsearch", 0, 0, 0, f_getcharsearch},
***************
*** 571,597 ****
{"getcmdpos", 0, 0, 0, f_getcmdpos},
{"getcmdtype", 0, 0, 0, f_getcmdtype},
{"getcmdwintype", 0, 0, 0, f_getcmdwintype},
! {"getcompletion", 2, 3, 0, f_getcompletion},
{"getcurpos", 0, 0, 0, f_getcurpos},
! {"getcwd", 0, 2, 0, f_getcwd},
! {"getenv", 1, 1, 0, f_getenv},
{"getfontname", 0, 1, 0, f_getfontname},
! {"getfperm", 1, 1, 0, f_getfperm},
! {"getfsize", 1, 1, 0, f_getfsize},
! {"getftime", 1, 1, 0, f_getftime},
! {"getftype", 1, 1, 0, f_getftype},
! {"getjumplist", 0, 2, 0, f_getjumplist},
! {"getline", 1, 2, 0, f_getline},
{"getloclist", 1, 2, 0, f_getloclist},
{"getmatches", 0, 1, 0, f_getmatches},
{"getpid", 0, 0, 0, f_getpid},
! {"getpos", 1, 1, 0, f_getpos},
{"getqflist", 0, 1, 0, f_getqflist},
! {"getreg", 0, 3, 0, f_getreg},
! {"getregtype", 0, 1, 0, f_getregtype},
! {"gettabinfo", 0, 1, 0, f_gettabinfo},
! {"gettabvar", 2, 3, 0, f_gettabvar},
! {"gettabwinvar", 3, 4, 0, f_gettabwinvar},
{"gettagstack", 0, 1, 0, f_gettagstack},
{"getwininfo", 0, 1, 0, f_getwininfo},
{"getwinpos", 0, 1, 0, f_getwinpos},
--- 571,597 ----
{"getcmdpos", 0, 0, 0, f_getcmdpos},
{"getcmdtype", 0, 0, 0, f_getcmdtype},
{"getcmdwintype", 0, 0, 0, f_getcmdwintype},
! {"getcompletion", 2, 3, FEARG_1, f_getcompletion},
{"getcurpos", 0, 0, 0, f_getcurpos},
! {"getcwd", 0, 2, FEARG_1, f_getcwd},
! {"getenv", 1, 1, FEARG_1, f_getenv},
{"getfontname", 0, 1, 0, f_getfontname},
! {"getfperm", 1, 1, FEARG_1, f_getfperm},
! {"getfsize", 1, 1, FEARG_1, f_getfsize},
! {"getftime", 1, 1, FEARG_1, f_getftime},
! {"getftype", 1, 1, FEARG_1, f_getftype},
! {"getjumplist", 0, 2, FEARG_1, f_getjumplist},
! {"getline", 1, 2, FEARG_1, f_getline},
{"getloclist", 1, 2, 0, f_getloclist},
{"getmatches", 0, 1, 0, f_getmatches},
{"getpid", 0, 0, 0, f_getpid},
! {"getpos", 1, 1, FEARG_1, f_getpos},
{"getqflist", 0, 1, 0, f_getqflist},
! {"getreg", 0, 3, FEARG_1, f_getreg},
! {"getregtype", 0, 1, FEARG_1, f_getregtype},
! {"gettabinfo", 0, 1, FEARG_1, f_gettabinfo},
! {"gettabvar", 2, 3, FEARG_1, f_gettabvar},
! {"gettabwinvar", 3, 4, FEARG_1, f_gettabwinvar},
{"gettagstack", 0, 1, 0, f_gettagstack},
{"getwininfo", 0, 1, 0, f_getwininfo},
{"getwinpos", 0, 1, 0, f_getwinpos},
***************
*** 793,799 ****
{"setcharsearch", 1, 1, 0, f_setcharsearch},
{"setcmdpos", 1, 1, 0, f_setcmdpos},
{"setenv", 2, 2, 0, f_setenv},
! {"setfperm", 2, 2, 0, f_setfperm},
{"setline", 2, 2, 0, f_setline},
{"setloclist", 2, 4, 0, f_setloclist},
{"setmatches", 1, 2, 0, f_setmatches},
--- 793,799 ----
{"setcharsearch", 1, 1, 0, f_setcharsearch},
{"setcmdpos", 1, 1, 0, f_setcmdpos},
{"setenv", 2, 2, 0, f_setenv},
! {"setfperm", 2, 2, FEARG_1, f_setfperm},
{"setline", 2, 2, 0, f_setline},
{"setloclist", 2, 4, 0, f_setloclist},
{"setmatches", 1, 2, 0, f_setmatches},
***************
*** 4477,4486 ****
return;
#ifdef FEAT_JUMPLIST
! (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
! ++emsg_off;
! buf = tv_get_buf(&argvars[0], FALSE);
! --emsg_off;
if (buf == NULL)
return;
--- 4477,4491 ----
return;
#ifdef FEAT_JUMPLIST
! if (argvars[0].v_type == VAR_UNKNOWN)
! buf = curbuf;
! else
! {
! (void)tv_get_number(&argvars[0]); // issue errmsg if type error
! ++emsg_off;
! buf = tv_get_buf(&argvars[0], FALSE);
! --emsg_off;
! }
if (buf == NULL)
return;
*** ../vim-8.1.1924/src/testdir/test_bufline.vim 2019-08-23 22:31:33.217176868 +0200
--- src/testdir/test_bufline.vim 2019-08-24 22:19:04.597085349 +0200
***************
*** 22,28 ****
call assert_equal(1, setbufline(b, 5, ['x']))
call assert_equal(1, setbufline(bufnr('$') + 1, 1, ['x']))
call assert_equal(0, setbufline(b, 4, ['d', 'e']))
! call assert_equal(['c'], getbufline(b, 3))
call assert_equal(['d'], getbufline(b, 4))
call assert_equal(['e'], getbufline(b, 5))
call assert_equal([], getbufline(b, 6))
--- 22,28 ----
call assert_equal(1, setbufline(b, 5, ['x']))
call assert_equal(1, setbufline(bufnr('$') + 1, 1, ['x']))
call assert_equal(0, setbufline(b, 4, ['d', 'e']))
! call assert_equal(['c'], b->getbufline(3))
call assert_equal(['d'], getbufline(b, 4))
call assert_equal(['e'], getbufline(b, 5))
call assert_equal([], getbufline(b, 6))
*** ../vim-8.1.1924/src/testdir/test_bufwintabinfo.vim 2019-08-21 22:49:48.111267837 +0200
--- src/testdir/test_bufwintabinfo.vim 2019-08-24 22:51:51.021349791 +0200
***************
*** 88,94 ****
call assert_equal(2, tablist[1].tabnr)
call assert_equal('build', tablist[0].
variables.space)
call assert_equal(w2_id, tablist[0].windows[0])
! call assert_equal([], gettabinfo(3))
tabonly | only
--- 88,94 ----
call assert_equal(2, tablist[1].tabnr)
call assert_equal('build', tablist[0].
variables.space)
call assert_equal(w2_id, tablist[0].windows[0])
! call assert_equal([], 3->gettabinfo())
tabonly | only
***************
*** 106,112 ****
endfunction
function Test_get_buf_options()
! let opts = getbufvar(bufnr('%'), '&')
call assert_equal(v:t_dict, type(opts))
call assert_equal(8, opts.tabstop)
endfunc
--- 106,112 ----
endfunction
function Test_get_buf_options()
! let opts = bufnr()->getbufvar('&')
call assert_equal(v:t_dict, type(opts))
call assert_equal(8, opts.tabstop)
endfunc
*** ../vim-8.1.1924/src/testdir/test_cd.vim 2019-08-23 22:31:33.213176889 +0200
--- src/testdir/test_cd.vim 2019-08-24 22:42:39.420616304 +0200
***************
*** 83,89 ****
tabfirst
call chdir('..')
call assert_equal('y', fnamemodify(getcwd(1, 2), ':t'))
! call assert_equal('z', fnamemodify(getcwd(3, 2), ':t'))
tabnext | wincmd t
eval '..'->chdir()
call assert_equal('Xdir', fnamemodify(getcwd(1, 2), ':t'))
--- 83,89 ----
tabfirst
call chdir('..')
call assert_equal('y', fnamemodify(getcwd(1, 2), ':t'))
! call assert_equal('z', fnamemodify(3->getcwd(2), ':t'))
tabnext | wincmd t
eval '..'->chdir()
call assert_equal('Xdir', fnamemodify(getcwd(1, 2), ':t'))
*** ../vim-8.1.1924/src/testdir/test_changelist.vim 2018-02-13 19:05:33.000000000 +0100
--- src/testdir/test_changelist.vim 2019-08-24 22:22:31.076157472 +0200
***************
*** 8,15 ****
bwipe!
enew
! call assert_equal([], getchangelist(10))
! call assert_equal([[], 0], getchangelist('%'))
call writefile(['line1', 'line2', 'line3'], 'Xfile1.txt')
call writefile(['line1', 'line2', 'line3'], 'Xfile2.txt')
--- 8,15 ----
bwipe!
enew
! call assert_equal([], 10->getchangelist())
! call assert_equal([[], 0], getchangelist())
call writefile(['line1', 'line2', 'line3'], 'Xfile1.txt')
call writefile(['line1', 'line2', 'line3'], 'Xfile2.txt')
*** ../vim-8.1.1924/src/testdir/test_cmdline.vim 2019-06-15 18:40:11.044368488 +0200
--- src/testdir/test_cmdline.vim 2019-08-24 22:25:59.803218917 +0200
***************
*** 209,215 ****
endif
let groupcount = len(getcompletion('', 'event'))
call assert_true(groupcount > 0)
! let matchcount = len(getcompletion('File', 'event'))
call assert_true(matchcount > 0)
call assert_true(groupcount > matchcount)
--- 209,215 ----
endif
let groupcount = len(getcompletion('', 'event'))
call assert_true(groupcount > 0)
! let matchcount = len('File'->getcompletion('event'))
call assert_true(matchcount > 0)
call assert_true(groupcount > matchcount)
*** ../vim-8.1.1924/src/testdir/test_edit.vim 2019-05-18 17:22:51.016673960 +0200
--- src/testdir/test_edit.vim 2019-08-24 22:40:11.965575228 +0200
***************
*** 199,209 ****
endfu
au InsertCharPre <buffer> :call DoIt()
call feedkeys("A\<f5>\<c-p>u\<cr>\<c-l>\<cr>", 'tx')
! call assert_equal(["Jan\<c-l>",''], getline(1,'$'))
%d
call setline(1, 'J')
call feedkeys("A\<f5>\<c-p>u\<down>\<c-l>\<cr>", 'tx')
! call assert_equal(["January"], getline(1,'$'))
delfu ListMonths
delfu DoIt
--- 199,209 ----
endfu
au InsertCharPre <buffer> :call DoIt()
call feedkeys("A\<f5>\<c-p>u\<cr>\<c-l>\<cr>", 'tx')
! call assert_equal(["Jan\<c-l>",''], 1->getline('$'))
%d
call setline(1, 'J')
call feedkeys("A\<f5>\<c-p>u\<down>\<c-l>\<cr>", 'tx')
! call assert_equal(["January"], 1->getline('$'))
delfu ListMonths
delfu DoIt
***************
*** 345,351 ****
call cursor(2, 4)
call feedkeys("R^\<c-d>", 'tnix')
call assert_equal(["\tabc", "def"], getline(1, '$'))
! call assert_equal([0, 2, 2, 0], getpos('.'))
%d
call setline(1, ["\tabc", "\t\tdef"])
call cursor(2, 2)
--- 345,351 ----
call cursor(2, 4)
call feedkeys("R^\<c-d>", 'tnix')
call assert_equal(["\tabc", "def"], getline(1, '$'))
! call assert_equal([0, 2, 2, 0], '.'->getpos())
%d
call setline(1, ["\tabc", "\t\tdef"])
call cursor(2, 2)
*** ../vim-8.1.1924/src/testdir/test_environ.vim 2019-06-04 08:22:49.885739661 +0200
--- src/testdir/test_environ.vim 2019-08-24 22:27:35.954786423 +0200
***************
*** 11,17 ****
func Test_getenv()
unlet! $TESTENV
! call assert_equal(v:null, getenv('TESTENV'))
let $TESTENV = 'foo'
call assert_equal('foo', getenv('TESTENV'))
endfunc
--- 11,17 ----
func Test_getenv()
unlet! $TESTENV
! call assert_equal(v:null, 'TESTENV'->getenv())
let $TESTENV = 'foo'
call assert_equal('foo', getenv('TESTENV'))
endfunc
*** ../vim-8.1.1924/src/testdir/test_file_perm.vim 2016-03-08 19:12:25.000000000 +0100
--- src/testdir/test_file_perm.vim 2019-08-24 22:30:05.686112871 +0200
***************
*** 2,11 ****
func Test_file_perm()
call assert_equal('', getfperm('Xtest'))
! call assert_equal(0, setfperm('Xtest', 'r--------'))
call writefile(['one'], 'Xtest')
! call assert_true(len(getfperm('Xtest')) == 9)
call assert_equal(1, setfperm('Xtest', 'rwx------'))
if has('win32')
--- 2,11 ----
func Test_file_perm()
call assert_equal('', getfperm('Xtest'))
! call assert_equal(0, 'Xtest'->setfperm('r--------'))
call writefile(['one'], 'Xtest')
! call assert_true(len('Xtest'->getfperm()) == 9)
call assert_equal(1, setfperm('Xtest', 'rwx------'))
if has('win32')
*** ../vim-8.1.1924/src/testdir/test_getvar.vim 2019-07-28 13:20:57.498863391 +0200
--- src/testdir/test_getvar.vim 2019-08-24 22:52:55.036990554 +0200
***************
*** 31,37 ****
let t:other = 777
let def_list = [4, 5, 6, 7]
tabrewind
! call assert_equal([1, 2, 3], gettabvar(3, 'var_list'))
call assert_equal([1, 2, 3], gettabvar(3, 'var_list', def_list))
call assert_equal({'var_list': [1, 2, 3], 'other': 777}, gettabvar(3, ''))
call assert_equal({'var_list': [1, 2, 3], 'other': 777},
--- 31,37 ----
let t:other = 777
let def_list = [4, 5, 6, 7]
tabrewind
! call assert_equal([1, 2, 3], 3->gettabvar('var_list'))
call assert_equal([1, 2, 3], gettabvar(3, 'var_list', def_list))
call assert_equal({'var_list': [1, 2, 3], 'other': 777}, gettabvar(3, ''))
call assert_equal({'var_list': [1, 2, 3], 'other': 777},
***************
*** 61,67 ****
let def_dict = {'dict2': 'newval'}
wincmd b
tabrewind
! call assert_equal({'dict': 'tabwin'}, gettabwinvar(2, 3, 'var_dict'))
call assert_equal({'dict': 'tabwin'},
\ gettabwinvar(2, 3, 'var_dict', def_dict))
call assert_equal({'var_dict': {'dict': 'tabwin'}}, gettabwinvar(2, 3, ''))
--- 61,67 ----
let def_dict = {'dict2': 'newval'}
wincmd b
tabrewind
! call assert_equal({'dict': 'tabwin'}, 2->gettabwinvar(3, 'var_dict'))
call assert_equal({'dict': 'tabwin'},
\ gettabwinvar(2, 3, 'var_dict', def_dict))
call assert_equal({'var_dict': {'dict': 'tabwin'}}, gettabwinvar(2, 3, ''))
*** ../vim-8.1.1924/src/testdir/test_jumplist.vim 2019-02-12 22:15:03.073282144 +0100
--- src/testdir/test_jumplist.vim 2019-08-24 22:45:23.675601159 +0200
***************
*** 39,45 ****
" Traverse the jump list and verify the results
5
exe "normal \<C-O>"
! call assert_equal(2, getjumplist(1)[1])
exe "normal 2\<C-O>"
call assert_equal(0, getjumplist(1, 1)[1])
exe "normal 3\<C-I>"
--- 39,45 ----
" Traverse the jump list and verify the results
5
exe "normal \<C-O>"
! call assert_equal(2, 1->getjumplist()[1])
exe "normal 2\<C-O>"
call assert_equal(0, getjumplist(1, 1)[1])
exe "normal 3\<C-I>"
*** ../vim-8.1.1924/src/testdir/test_put.vim 2019-05-23 23:27:29.781416583 +0200
--- src/testdir/test_put.vim 2019-08-24 22:48:58.770331886 +0200
***************
*** 22,28 ****
func Test_put_char_block2()
new
! let a = [ getreg('a'), getregtype('a') ]
call setreg('a', ' one ', 'v')
call setline(1, ['Line 1', '', 'Line 3', ''])
" visually select the first 3 lines and put register a over it
--- 22,28 ----
func Test_put_char_block2()
new
! let a = [ 'a'->getreg(), 'a'->getregtype() ]
call setreg('a', ' one ', 'v')
call setline(1, ['Line 1', '', 'Line 3', ''])
" visually select the first 3 lines and put register a over it
*** ../vim-8.1.1924/src/testdir/test_stat.vim 2018-11-18 12:25:04.219533634 +0100
--- src/testdir/test_stat.vim 2019-08-24 22:33:46.400423271 +0200
***************
*** 10,16 ****
let fl = ['Hello World!']
for fname in fnames
call writefile(fl, fname)
! call add(times, getftime(fname))
if a:doSleep
sleep 1
endif
--- 10,16 ----
let fl = ['Hello World!']
for fname in fnames
call writefile(fl, fname)
! call add(times, fname->getftime())
if a:doSleep
sleep 1
endif
***************
*** 19,26 ****
let time_correct = (times[0] <= times[1] && times[1] <= times[2])
if a:doSleep || time_correct
call assert_true(time_correct, printf('Expected %s <= %s <= %s', times[0], times[1], times[2]))
! call assert_equal(strlen(fl[0] . "\n"), getfsize(fnames[0]))
! call assert_equal('file', getftype(fnames[0]))
call assert_equal('rw-', getfperm(fnames[0])[0:2])
let result = 1
endif
--- 19,26 ----
let time_correct = (times[0] <= times[1] && times[1] <= times[2])
if a:doSleep || time_correct
call assert_true(time_correct, printf('Expected %s <= %s <= %s', times[0], times[1], times[2]))
! call assert_equal(strlen(fl[0] . "\n"), fnames[0]->getfsize())
! call assert_equal('file', fnames[0]->getftype())
call assert_equal('rw-', getfperm(fnames[0])[0:2])
let result = 1
endif
*** ../vim-8.1.1924/src/version.c 2019-08-24 22:14:52.826215824 +0200
--- src/version.c 2019-08-24 22:53:26.076817325 +0200
***************
*** 763,764 ****
--- 763,766 ----
{ /* Add new patch number below this line */
+ /**/
+ 1925,
/**/
--
FIXME and XXX are two common keywords used to mark broken or incomplete code
not only since XXX as a sex reference would grab everybody's attention but
simply due to the fact that Vim would highlight these words.
-- Hendrik Scholz
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///