]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0307: more mismatches between return types and documentation v9.2.0307
authorHirohito Higashi <h.east.727@gmail.com>
Mon, 6 Apr 2026 12:49:53 +0000 (12:49 +0000)
committerChristian Brabandt <cb@256bit.org>
Mon, 6 Apr 2026 12:49:53 +0000 (12:49 +0000)
Problem:  more mismatches between return types and documentation
Solution: Update documentation, fix return type for remote_foreground()
          and test_mswin_event() (Hirohito Higashi)

Doc summary table fixes:
- ch_info: String -> Dict
- spellbadword: String -> List
- undotree: List -> Dict
- test_getvalue: any -> Number
- instanceof, popup_filter_menu, popup_filter_yesno: Number -> Bool
- remote_foreground: Number -> none
- test_mswin_event: bool -> Bool

evalfunc.c fixes:
- remote_foreground: ret_string -> ret_void
- test_mswin_event: ret_number -> ret_bool

Detail "Return type:" fixes:
- instanceof: Number -> vim9-boolean
- remote_foreground: Number -> void
- popup_filter_menu, popup_filter_yesno: Number -> vim9-boolean

related: #19922
closes:  #19923

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/builtin.txt
runtime/doc/popup.txt
src/evalfunc.c
src/version.c

index 565bc8df8483d7e03efbcb1a5e36b79484449471..24776535cb71c56c32640a8358841722abb6d7d8 100644 (file)
@@ -105,7 +105,7 @@ ch_evalraw({handle}, {string} [, {options}])
                                any     evaluate {string} on raw {handle}
 ch_getbufnr({handle}, {what})  Number  get buffer number for {handle}/{what}
 ch_getjob({channel})           Job     get the Job of {channel}
-ch_info({handle})              String  info about channel {handle}
+ch_info({handle})              Dict    info about channel {handle}
 ch_listen({address} [, {options}])
                                Channel listen on {address}
 ch_log({msg} [, {handle}])     none    write {msg} in the channel log file
@@ -351,7 +351,7 @@ inputsecret({prompt} [, {text}])
 insert({object}, {item} [, {idx}])
                                List    insert {item} in {object}
                                        [before {idx}]
-instanceof({object}, {class})  Number  |TRUE| if {object} is an instance of
+instanceof({object}, {class})  Bool    |TRUE| if {object} is an instance of
                                        {class}
 interrupt()                    none    interrupt script execution
 invert({expr})                 Number  bitwise invert
@@ -455,8 +455,8 @@ popup_clear()                       none    close all popup windows
 popup_close({id} [, {result}]) none    close popup window {id}
 popup_create({what}, {options}) Number create a popup window
 popup_dialog({what}, {options}) Number create a popup window used as a dialog
-popup_filter_menu({id}, {key})  Number filter for a menu popup window
-popup_filter_yesno({id}, {key}) Number filter for a dialog popup window
+popup_filter_menu({id}, {key})  Bool   filter for a menu popup window
+popup_filter_yesno({id}, {key}) Bool   filter for a dialog popup window
 popup_findecho()               Number  get window ID of popup for `:echowin`
 popup_findinfo()               Number  get window ID of info popup window
 popup_findpreview()            Number  get window ID of preview popup window
@@ -531,7 +531,7 @@ reltimefloat({time})                Float   turn the time value into a Float
 reltimestr({time})             String  turn time value into a String
 remote_expr({server}, {string} [, {idvar} [, {timeout}]])
                                String  send expression
-remote_foreground({server})    Number  bring Vim server to the foreground
+remote_foreground({server})    none    bring Vim server to the foreground
 remote_peek({serverid} [, {retvar}])
                                Number  check for reply string
 remote_read({serverid} [, {timeout}])
@@ -642,7 +642,7 @@ sound_playfile({path} [, {callback}])
                                Number  play sound file {path}
 sound_stop({id})               none    stop playing sound {id}
 soundfold({word})              String  sound-fold {word}
-spellbadword()                 String  badly spelled word at cursor
+spellbadword()                 List    badly spelled word at cursor
 spellsuggest({word} [, {max} [, {capital}]])
                                List    spelling suggestions
 split({expr} [, {pat} [, {keepempty}]])
@@ -746,11 +746,11 @@ test_autochdir()          none    enable 'autochdir' during startup
 test_feedinput({string})       none    add key sequence to input buffer
 test_garbagecollect_now()      none    free memory right now for testing
 test_garbagecollect_soon()     none    free memory soon for testing
-test_getvalue({string})                any     get value of an internal variable
+test_getvalue({string})                Number  get value of an internal variable
 test_gui_event({event}, {args})        bool    generate a GUI event for testing
 test_ignore_error({expr})      none    ignore a specific error
 test_mswin_event({event}, {args})
-                               bool    generate MS-Windows event for testing
+                               Bool    generate MS-Windows event for testing
 test_null_blob()               Blob    null value for testing
 test_null_channel()            Channel null value for testing
 test_null_dict()               Dict    null value for testing
@@ -787,7 +787,7 @@ tuple2list({tuple})         List    turn {tuple} of items into a list
 type({expr})                   Number  type of value {expr}
 typename({expr})               String  representation of the type of {expr}
 undofile({name})               String  undo file name for {name}
-undotree([{buf}])              List    undo file tree for buffer {buf}
+undotree([{buf}])              Dict    undo file tree for buffer {buf}
 uniq({list} [, {func} [, {dict}]])
                                List    remove adjacent duplicates from a list
 uri_decode({string})           String  URI-decode a string
@@ -6268,7 +6268,7 @@ instanceof({object}, {class})                     *instanceof()* *E614* *E616* *E693*
 <              Can also be used as a |method|: >
                        myobj->instanceof(mytype)
 <
-               Return type: |Number|
+               Return type: |vim9-boolean|
 
 
 interrupt()                                            *interrupt()*
@@ -9049,7 +9049,7 @@ remote_foreground({server})                               *remote_foreground()*
                Can also be used as a |method|: >
                        ServerName()->remote_foreground()
 <
-               Return type: |Number|
+               Return type: void
 
                {only in the Win32, Motif and GTK GUI versions and the
                Win32 console version}
index 899b7d18bba0fd966870c007924cee03cfa6e788..6b99ac47ee96fcf06617c5514bb11f427b1090b2 100644 (file)
@@ -351,7 +351,7 @@ popup_filter_menu({id}, {key})                              *popup_filter_menu()*
                To add shortcut keys, see the example here:
                |popup_menu-shortcut-example|
 
-               Return type: |Number|
+               Return type: |vim9-boolean|
 
 
 popup_filter_yesno({id}, {key})                                *popup_filter_yesno()*
@@ -363,7 +363,7 @@ popup_filter_yesno({id}, {key})                             *popup_filter_yesno()*
                keys are ignored.
                See the example here: |popup_dialog-example|
 
-               Return type: |Number|
+               Return type: |vim9-boolean|
 
 
 popup_findecho()                                       *popup_findecho()*
index b7e073bbe4f87cca96d39dcf514853f99a99a723..b4ea12c3c397cbd1472524d6f98249caea7f7fd9 100644 (file)
@@ -2750,7 +2750,7 @@ static const funcentry_T global_functions[] =
     {"remote_expr",    2, 4, FEARG_1,      arg24_remote_expr,
                        ret_string,         f_remote_expr},
     {"remote_foreground", 1, 1, FEARG_1,    arg1_string,
-                       ret_string,         f_remote_foreground},
+                       ret_void,           f_remote_foreground},
     {"remote_peek",    1, 2, FEARG_1,      arg2_string,
                        ret_number,         f_remote_peek},
     {"remote_read",    1, 2, FEARG_1,      arg2_string_number,
@@ -3080,7 +3080,7 @@ static const funcentry_T global_functions[] =
     {"test_ignore_error", 1, 1, FEARG_1,    arg1_string,
                        ret_void,           f_test_ignore_error},
     {"test_mswin_event", 2, 2, FEARG_1,     arg2_string_dict,
-                       ret_number,         f_test_mswin_event},
+                       ret_bool,           f_test_mswin_event},
     {"test_null_blob", 0, 0, 0,            NULL,
                        ret_blob,           f_test_null_blob},
     {"test_null_channel", 0, 0, 0,         NULL,
index a149bba0ad0cd5ae925806b65a8576d07a4c60b3..e66c21d47eabd6da12fccd35dafb5e435b3e890e 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    307,
 /**/
     306,
 /**/