To: vim_dev@googlegroups.com Subject: Patch 8.2.3576 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3576 Problem: Some functions are not documented for use with a method. Solution: Add examples. Fix that sign_unplacelist() only takes one argument. (Sean Dewar, closes #9081) Files: src/evalfunc.c, runtime/doc/eval.txt *** ../vim-8.2.3575/src/evalfunc.c 2021-10-17 17:20:20.399745698 +0100 --- src/evalfunc.c 2021-11-03 13:06:54.757895518 +0000 *************** *** 1955,1961 **** ret_number_bool, SIGN_FUNC(f_sign_undefine)}, {"sign_unplace", 1, 2, FEARG_1, arg2_string_dict, ret_number_bool, SIGN_FUNC(f_sign_unplace)}, ! {"sign_unplacelist", 1, 2, FEARG_1, arg1_list_any, ret_list_number, SIGN_FUNC(f_sign_unplacelist)}, {"simplify", 1, 1, FEARG_1, arg1_string, ret_string, f_simplify}, --- 1955,1961 ---- ret_number_bool, SIGN_FUNC(f_sign_undefine)}, {"sign_unplace", 1, 2, FEARG_1, arg2_string_dict, ret_number_bool, SIGN_FUNC(f_sign_unplace)}, ! {"sign_unplacelist", 1, 1, FEARG_1, arg1_list_any, ret_list_number, SIGN_FUNC(f_sign_unplacelist)}, {"simplify", 1, 1, FEARG_1, arg1_string, ret_string, f_simplify}, *** ../vim-8.2.3575/runtime/doc/eval.txt 2021-11-02 21:39:40.093064578 +0000 --- runtime/doc/eval.txt 2021-11-03 13:08:52.191419627 +0000 *************** *** 3341,3347 **** < 2.356194 Can also be used as a |method|: > ! Compute()->atan(1) < {only available when compiled with the |+float| feature} --- 3359,3365 ---- < 2.356194 Can also be used as a |method|: > ! Compute()->atan2(1) < {only available when compiled with the |+float| feature} *************** *** 4944,4949 **** --- 4980,4988 ---- :echo flatten([1, [2, [3, 4]], 5], 1) < [1, 2, [3, 4], 5] + Can also be used as a |method|: > + mylist->flatten() + < flattennew({list} [, {maxdepth}]) *flattennew()* Like |flatten()| but first make a copy of {list}. *************** *** 5695,5702 **** With the cursor on '보' in line 3 with text "여보세요": > getcursorcharpos() returns [0, 3, 2, 0, 3] getcurpos() returns [0, 3, 4, 0, 3] ! ! < Can also be used as a |method|: > GetWinid()->getcursorcharpos() < *getcwd()* --- 5748,5755 ---- With the cursor on '보' in line 3 with text "여보세요": > getcursorcharpos() returns [0, 3, 2, 0, 3] getcurpos() returns [0, 3, 4, 0, 3] ! < ! Can also be used as a |method|: > GetWinid()->getcursorcharpos() < *getcwd()* *************** *** 9375,9381 **** |getpos()| (default: cursor's position) ! searchdecl({name} [, {global} [, {thisblock}]]) *searchdecl()* Search for the declaration of {name}. --- 9472,9480 ---- |getpos()| (default: cursor's position) ! Can also be used as a |method|: > ! GetSearchOpts()->searchcount() ! < searchdecl({name} [, {global} [, {thisblock}]]) *searchdecl()* Search for the declaration of {name}. *************** *** 10032,10038 **** Can also be used as a |method|, the base is passed as the fourth argument: > ! GetValue()->settabvar(tab, winnr, name) settagstack({nr}, {dict} [, {action}]) *settagstack()* Modify the tag stack of the window {nr} using {dict}. --- 10138,10144 ---- Can also be used as a |method|, the base is passed as the fourth argument: > ! GetValue()->settabwinvar(tab, winnr, name) settagstack({nr}, {dict} [, {action}]) *settagstack()* Modify the tag stack of the window {nr} using {dict}. *************** *** 10774,10783 **** :echo strftime("%c", strptime("%Y%m%d%H%M%S", "19970427115355") + 3600) < Sun Apr 27 12:53:55 1997 Not available on all systems. To check use: > :if exists("*strptime") - strridx({haystack}, {needle} [, {start}]) *strridx()* The result is a Number, which gives the byte index in {haystack} of the last occurrence of the String {needle}. --- 10893,10904 ---- :echo strftime("%c", strptime("%Y%m%d%H%M%S", "19970427115355") + 3600) < Sun Apr 27 12:53:55 1997 + Can also be used as a |method|: > + GetFormat()->strptime(timestring) + < Not available on all systems. To check use: > :if exists("*strptime") strridx({haystack}, {needle} [, {start}]) *strridx()* The result is a Number, which gives the byte index in {haystack} of the last occurrence of the String {needle}. *************** *** 11728,11734 **** popup window then 'buftype' is "terminal" and win_gettype() returns "popup". ! win_gotoid({expr}) *win_gotoid()* Go to window with ID {expr}. This may also change the current tabpage. --- 11850,11858 ---- popup window then 'buftype' is "terminal" and win_gettype() returns "popup". ! Can also be used as a |method|: > ! GetWinid()->win_gettype() ! < win_gotoid({expr}) *win_gotoid()* Go to window with ID {expr}. This may also change the current tabpage. *** ../vim-8.2.3575/src/version.c 2021-11-02 23:10:56.930903622 +0000 --- src/version.c 2021-11-03 13:11:03.053135148 +0000 *************** *** 759,760 **** --- 759,762 ---- { /* Add new patch number below this line */ + /**/ + 3576, /**/ -- GALAHAD turns back. We see from his POV the lovely ZOOT standing by him smiling enchantingly and a number of equally delectable GIRLIES draped around in the seductively poulticed room. They look at him smilingly and wave. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///