patch 9.1.1509: patch 9.1.1505 was not good
Problem: Patch 9.1.1505 was not good
Solution: Revert "patch 9.1.1505: not possible to return completion type
for :ex command" and instead add the getcompletiontype()
function (Hirohito Higashi).
related: #17606
closes: #17662
Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
a8b86605f3
commit
96b3ef2389
@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.1. Last change: 2025 Jul 03
|
||||
*builtin.txt* For Vim version 9.1. Last change: 2025 Jul 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -238,8 +238,8 @@ getcharsearch() Dict last character search
|
||||
getcharstr([{expr} [, {opts}]]) String get one character from the user
|
||||
getcmdcomplpat() String return the completion pattern of the
|
||||
current command-line completion
|
||||
getcmdcompltype({pat}) String return the type of command-line
|
||||
completion
|
||||
getcmdcompltype() String return the type of the current
|
||||
command-line completion
|
||||
getcmdline() String return the current command-line input
|
||||
getcmdpos() Number return cursor position in command-line
|
||||
getcmdprompt() String return the current command-line prompt
|
||||
@ -249,6 +249,8 @@ getcmdtype() String return current command-line type
|
||||
getcmdwintype() String return current command-line window type
|
||||
getcompletion({pat}, {type} [, {filtered}])
|
||||
List list of cmdline completion matches
|
||||
getcompletiontype({pat}) String return the type of the command-line
|
||||
completion using {pat}
|
||||
getcurpos([{winnr}]) List position of the cursor
|
||||
getcursorcharpos([{winnr}]) List character position of the cursor
|
||||
getcwd([{winnr} [, {tabnr}]]) String get the current working directory
|
||||
@ -4201,16 +4203,18 @@ getcmdcomplpat() *getcmdcomplpat()*
|
||||
Return type: |String|
|
||||
|
||||
|
||||
getcmdcompltype([{pat}]) *getcmdcompltype()*
|
||||
Return the type of command-line completion using {pat}.
|
||||
If {pat} is omited, only works when the command line is being
|
||||
edited, thus requires use of |c_CTRL-\_e| or |c_CTRL-R_=|.
|
||||
|
||||
getcmdcompltype() *getcmdcompltype()*
|
||||
Return the type of the current command-line completion.
|
||||
Only works when the command line is being edited, thus
|
||||
requires use of |c_CTRL-\_e| or |c_CTRL-R_=|.
|
||||
See |:command-completion| for the return string.
|
||||
Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()|,
|
||||
|getcmdprompt()|, |getcmdcomplpat()| and |setcmdline()|.
|
||||
Returns an empty string when completion is not defined.
|
||||
|
||||
To get the type of the command-line completion for the
|
||||
specified string, use |getcompletiontype()|.
|
||||
|
||||
Return type: |String|
|
||||
|
||||
|
||||
@ -4369,6 +4373,15 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
|
||||
<
|
||||
Return type: list<string>
|
||||
|
||||
getcompletiontype({pat}) *getcompletiontype()*
|
||||
Return the type of the command-line completion using {pat}.
|
||||
When no corresponding completion type is found, an empty
|
||||
string is returned.
|
||||
To get the current command-line completion type, use
|
||||
|getcmdcompltype()|.
|
||||
|
||||
Return type: |String|
|
||||
|
||||
*getcurpos()*
|
||||
getcurpos([{winid}])
|
||||
Get the position of the cursor. This is like getpos('.'), but
|
||||
|
||||
@ -7976,6 +7976,7 @@ getcmdscreenpos() builtin.txt /*getcmdscreenpos()*
|
||||
getcmdtype() builtin.txt /*getcmdtype()*
|
||||
getcmdwintype() builtin.txt /*getcmdwintype()*
|
||||
getcompletion() builtin.txt /*getcompletion()*
|
||||
getcompletiontype() builtin.txt /*getcompletiontype()*
|
||||
getcurpos() builtin.txt /*getcurpos()*
|
||||
getcursorcharpos() builtin.txt /*getcursorcharpos()*
|
||||
getcwd() builtin.txt /*getcwd()*
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 9.1. Last change: 2025 Jul 03
|
||||
*usr_41.txt* For Vim version 9.1. Last change: 2025 Jul 05
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@ -1100,7 +1100,8 @@ Buffers, windows and the argument list:
|
||||
Command line: *command-line-functions*
|
||||
getcmdcomplpat() get completion pattern of the current command
|
||||
line
|
||||
getcmdcompltype() get the type of the command line completion
|
||||
getcmdcompltype() get the type of the current command line
|
||||
completion
|
||||
getcmdline() get the current command line input
|
||||
getcmdprompt() get the current command line prompt
|
||||
getcmdpos() get position of the cursor in the command line
|
||||
@ -1111,6 +1112,8 @@ Command line: *command-line-functions*
|
||||
getcmdtype() return the current command-line type
|
||||
getcmdwintype() return the current command-line window type
|
||||
getcompletion() list of command-line completion matches
|
||||
getcompletiontype() get the type of the command-line completion
|
||||
for specified string
|
||||
fullcommand() get full command name
|
||||
cmdcomplete_info() get command-line completion information
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
*version9.txt* For Vim version 9.1. Last change: 2025 Jul 03
|
||||
*version9.txt* For Vim version 9.1. Last change: 2025 Jul 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -41607,8 +41607,6 @@ Completion: ~
|
||||
- allow to complete directories from 'cdpath' for |:cd| and similar commands,
|
||||
add the "cd_in_path" completion type for e.g. |:command-complete| and
|
||||
|getcompletion()|
|
||||
- |getcompletion()| now accepts a pat and returns the completion type for the
|
||||
{pat} argument
|
||||
- allow to complete shell commands and files using the new shellcmdline
|
||||
completion type using |:command-complete| and |getcmdcomplpat()|
|
||||
- allow to specify additional attributes in the completion menu (allows to
|
||||
@ -41713,6 +41711,7 @@ Functions: ~
|
||||
|getcellpixels()| get List of terminal cell pixel size
|
||||
|getcmdcomplpat()| Shell command line completion
|
||||
|getcmdprompt()| get prompt for input()/confirm()
|
||||
|getcompletiontype()| get command-line completion type
|
||||
|getregion()| get a region of text from a buffer
|
||||
|getregionpos()| get a list of positions for a region
|
||||
|getstacktrace()| get current stack trace of Vim scripts
|
||||
|
||||
Reference in New Issue
Block a user