Skip to content

Corrections to documentation of builtin functions #17273

@msoyka2024

Description

@msoyka2024

The following are suggested changes to the documentation file builtin.txt regarding returned values (apologies for the ragged formatting).

  1. cursor()
    Documentation says returned value is Number but what that number represents is not documented.

Based on documentation in the source code, suggest adding this statement:
"Returns 0 when the position could be set, -1 otherwise."

  1. setcursorcharpos()
    Same comments as for cursor().

Based on the source code, suggest adding this statement:
"Returns 0 when the position could be set, -1 otherwise."

  1. feedkeys()
    Documentation states "Return value is always 0" but "Return type" is given as "String or list<string> depending on {list}".
    At a minimum, the documentation is inconsistent.
    Regarding "Return type", the function does not have a {list} argument.

Suspect that the Return type should be Number.

  1. finddir() & findfile()
    In response to issue Improve documentation #17171, the documented return types for finddir() and findfile() were updated to include list<string>.
    However, the help topic "builtin-function-list" should also have been updated but was not.

Suggestion: change "String" to "String or List" in that help topic.

  1. getreg()
    Return type is documented as String but list<string> is also possible if the {list} argument is true.

Suggested corrections (not sure which would be correct):
Return type: String or list<string> depending on {list}.
or
Return type: String or list<any> depending on {list}.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions