diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-06-18 06:45:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-18 06:45:28 +0800 |
commit | 7363b695debf6341b75337f99accfa7fcc9dbe1d (patch) | |
tree | c2f9d18c6238808e1480cf6a8bd0cd1e5aab8e42 /src/nvim/cmdexpand.c | |
parent | b60030b7bf3e638ba134550091131fc5229b69a1 (diff) | |
parent | c2491fbab43fc506f7f902c72206d890e01688a5 (diff) | |
download | rneovim-7363b695debf6341b75337f99accfa7fcc9dbe1d.tar.gz rneovim-7363b695debf6341b75337f99accfa7fcc9dbe1d.tar.bz2 rneovim-7363b695debf6341b75337f99accfa7fcc9dbe1d.zip |
Merge pull request #29379 from zeertzjq/vim-9.1.0495
vim-patch:9.1.{0495,0496}
Diffstat (limited to 'src/nvim/cmdexpand.c')
-rw-r--r-- | src/nvim/cmdexpand.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nvim/cmdexpand.c b/src/nvim/cmdexpand.c index f75b84c77b..9ee5cde5b2 100644 --- a/src/nvim/cmdexpand.c +++ b/src/nvim/cmdexpand.c @@ -402,6 +402,20 @@ void cmdline_pum_cleanup(CmdlineInfo *cclp) wildmenu_cleanup(cclp); } +/// Returns the current cmdline completion pattern. +char *cmdline_compl_pattern(void) +{ + expand_T *xp = get_cmdline_info()->xpc; + return xp == NULL ? NULL : xp->xp_orig; +} + +/// Returns true if fuzzy cmdline completion is active, false otherwise. +bool cmdline_compl_is_fuzzy(void) +{ + expand_T *xp = get_cmdline_info()->xpc; + return xp != NULL && cmdline_fuzzy_completion_supported(xp); +} + /// Return the number of characters that should be skipped in the wildmenu /// These are backslashes used for escaping. Do show backslashes in help tags. static int skip_wildmenu_char(expand_T *xp, char *s) |