Skip to content

Commit 002fdde

Browse files
h-eastclaude
authored andcommitted
patch 9.2.0307: more mismatches between return types and documentation
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) <[email protected]> Signed-off-by: Hirohito Higashi <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent 78954f8 commit 002fdde

4 files changed

Lines changed: 17 additions & 15 deletions

File tree

runtime/doc/builtin.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ ch_evalraw({handle}, {string} [, {options}])
105105
any evaluate {string} on raw {handle}
106106
ch_getbufnr({handle}, {what}) Number get buffer number for {handle}/{what}
107107
ch_getjob({channel}) Job get the Job of {channel}
108-
ch_info({handle}) String info about channel {handle}
108+
ch_info({handle}) Dict info about channel {handle}
109109
ch_listen({address} [, {options}])
110110
Channel listen on {address}
111111
ch_log({msg} [, {handle}]) none write {msg} in the channel log file
@@ -351,7 +351,7 @@ inputsecret({prompt} [, {text}])
351351
insert({object}, {item} [, {idx}])
352352
List insert {item} in {object}
353353
[before {idx}]
354-
instanceof({object}, {class}) Number |TRUE| if {object} is an instance of
354+
instanceof({object}, {class}) Bool |TRUE| if {object} is an instance of
355355
{class}
356356
interrupt() none interrupt script execution
357357
invert({expr}) Number bitwise invert
@@ -455,8 +455,8 @@ popup_clear() none close all popup windows
455455
popup_close({id} [, {result}]) none close popup window {id}
456456
popup_create({what}, {options}) Number create a popup window
457457
popup_dialog({what}, {options}) Number create a popup window used as a dialog
458-
popup_filter_menu({id}, {key}) Number filter for a menu popup window
459-
popup_filter_yesno({id}, {key}) Number filter for a dialog popup window
458+
popup_filter_menu({id}, {key}) Bool filter for a menu popup window
459+
popup_filter_yesno({id}, {key}) Bool filter for a dialog popup window
460460
popup_findecho() Number get window ID of popup for `:echowin`
461461
popup_findinfo() Number get window ID of info popup window
462462
popup_findpreview() Number get window ID of preview popup window
@@ -531,7 +531,7 @@ reltimefloat({time}) Float turn the time value into a Float
531531
reltimestr({time}) String turn time value into a String
532532
remote_expr({server}, {string} [, {idvar} [, {timeout}]])
533533
String send expression
534-
remote_foreground({server}) Number bring Vim server to the foreground
534+
remote_foreground({server}) none bring Vim server to the foreground
535535
remote_peek({serverid} [, {retvar}])
536536
Number check for reply string
537537
remote_read({serverid} [, {timeout}])
@@ -642,7 +642,7 @@ sound_playfile({path} [, {callback}])
642642
Number play sound file {path}
643643
sound_stop({id}) none stop playing sound {id}
644644
soundfold({word}) String sound-fold {word}
645-
spellbadword() String badly spelled word at cursor
645+
spellbadword() List badly spelled word at cursor
646646
spellsuggest({word} [, {max} [, {capital}]])
647647
List spelling suggestions
648648
split({expr} [, {pat} [, {keepempty}]])
@@ -746,11 +746,11 @@ test_autochdir() none enable 'autochdir' during startup
746746
test_feedinput({string}) none add key sequence to input buffer
747747
test_garbagecollect_now() none free memory right now for testing
748748
test_garbagecollect_soon() none free memory soon for testing
749-
test_getvalue({string}) any get value of an internal variable
749+
test_getvalue({string}) Number get value of an internal variable
750750
test_gui_event({event}, {args}) bool generate a GUI event for testing
751751
test_ignore_error({expr}) none ignore a specific error
752752
test_mswin_event({event}, {args})
753-
bool generate MS-Windows event for testing
753+
Bool generate MS-Windows event for testing
754754
test_null_blob() Blob null value for testing
755755
test_null_channel() Channel null value for testing
756756
test_null_dict() Dict null value for testing
@@ -787,7 +787,7 @@ tuple2list({tuple}) List turn {tuple} of items into a list
787787
type({expr}) Number type of value {expr}
788788
typename({expr}) String representation of the type of {expr}
789789
undofile({name}) String undo file name for {name}
790-
undotree([{buf}]) List undo file tree for buffer {buf}
790+
undotree([{buf}]) Dict undo file tree for buffer {buf}
791791
uniq({list} [, {func} [, {dict}]])
792792
List remove adjacent duplicates from a list
793793
uri_decode({string}) String URI-decode a string
@@ -6268,7 +6268,7 @@ instanceof({object}, {class}) *instanceof()* *E614* *E616* *E693*
62686268
< Can also be used as a |method|: >
62696269
myobj->instanceof(mytype)
62706270
<
6271-
Return type: |Number|
6271+
Return type: |vim9-boolean|
62726272

62736273

62746274
interrupt() *interrupt()*
@@ -9049,7 +9049,7 @@ remote_foreground({server}) *remote_foreground()*
90499049
Can also be used as a |method|: >
90509050
ServerName()->remote_foreground()
90519051
<
9052-
Return type: |Number|
9052+
Return type: void
90539053

90549054
{only in the Win32, Motif and GTK GUI versions and the
90559055
Win32 console version}

runtime/doc/popup.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ popup_filter_menu({id}, {key}) *popup_filter_menu()*
351351
To add shortcut keys, see the example here:
352352
|popup_menu-shortcut-example|
353353

354-
Return type: |Number|
354+
Return type: |vim9-boolean|
355355

356356

357357
popup_filter_yesno({id}, {key}) *popup_filter_yesno()*
@@ -363,7 +363,7 @@ popup_filter_yesno({id}, {key}) *popup_filter_yesno()*
363363
keys are ignored.
364364
See the example here: |popup_dialog-example|
365365

366-
Return type: |Number|
366+
Return type: |vim9-boolean|
367367

368368

369369
popup_findecho() *popup_findecho()*

src/evalfunc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2750,7 +2750,7 @@ static const funcentry_T global_functions[] =
27502750
{"remote_expr", 2, 4, FEARG_1, arg24_remote_expr,
27512751
ret_string, f_remote_expr},
27522752
{"remote_foreground", 1, 1, FEARG_1, arg1_string,
2753-
ret_string, f_remote_foreground},
2753+
ret_void, f_remote_foreground},
27542754
{"remote_peek", 1, 2, FEARG_1, arg2_string,
27552755
ret_number, f_remote_peek},
27562756
{"remote_read", 1, 2, FEARG_1, arg2_string_number,
@@ -3080,7 +3080,7 @@ static const funcentry_T global_functions[] =
30803080
{"test_ignore_error", 1, 1, FEARG_1, arg1_string,
30813081
ret_void, f_test_ignore_error},
30823082
{"test_mswin_event", 2, 2, FEARG_1, arg2_string_dict,
3083-
ret_number, f_test_mswin_event},
3083+
ret_bool, f_test_mswin_event},
30843084
{"test_null_blob", 0, 0, 0, NULL,
30853085
ret_blob, f_test_null_blob},
30863086
{"test_null_channel", 0, 0, 0, NULL,

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,8 @@ static char *(features[]) =
734734

735735
static int included_patches[] =
736736
{ /* Add new patch number below this line */
737+
/**/
738+
307,
737739
/**/
738740
306,
739741
/**/

0 commit comments

Comments
 (0)