@@ -2594,10 +2594,12 @@ getbufline({expr}, {lnum} [, {end}])
25942594getbufvar({expr}, {varname} [, {def}])
25952595 any variable {varname} in buffer {expr}
25962596getchangelist([{expr}]) List list of change list items
2597- getchar([expr]) Number get one character from the user
2597+ getchar([expr]) Number or String
2598+ get one character from the user
25982599getcharmod() Number modifiers for the last typed character
25992600getcharpos({expr}) List position of cursor, mark, etc.
26002601getcharsearch() Dict last character search
2602+ getcharstr([expr]) String get one character from the user
26012603getcmdline() String return the current command-line
26022604getcmdpos() Number return cursor position in command-line
26032605getcmdtype() String return current command-line type
@@ -5232,6 +5234,7 @@ getchar([expr]) *getchar()*
52325234 Return zero otherwise.
52335235 If [expr] is 1, only check if a character is available, it is
52345236 not consumed. Return zero if no character available.
5237+ If you prefer always getting a string use |getcharstr()|.
52355238
52365239 Without [expr] and when [expr] is 0 a whole character or
52375240 special key is returned. If it is a single character, the
@@ -5357,6 +5360,20 @@ getcharsearch() *getcharsearch()*
53575360 :nnoremap <expr> , getcharsearch().forward ? ',' : ';'
53585361< Also see |setcharsearch()|.
53595362
5363+
5364+ getcharstr([expr]) *getcharstr()*
5365+ Get a single character from the user or input stream as a
5366+ string.
5367+ If [expr] is omitted, wait until a character is available.
5368+ If [expr] is 0 or false, only get a character when one is
5369+ available. Return an empty string otherwise.
5370+ If [expr] is 1 or true, only check if a character is
5371+ available, it is not consumed. Return an empty string
5372+ if no character is available.
5373+ Otherwise this works like |getchar()|, except that a number
5374+ result is converted to a string.
5375+
5376+
53605377getcmdline() *getcmdline()*
53615378 Return the current command-line. Only works when the command
53625379 line is being edited, thus requires use of |c_CTRL-\_e| or
0 commit comments