From 0f75b2ad2e23107f8112b6dcd4785eeef6cc34aa Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 20 Jun 2024 05:56:58 +0200 Subject: Merging upstream version 2:9.1.0496. Signed-off-by: Daniel Baumann --- src/cmdexpand.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/cmdexpand.c') diff --git a/src/cmdexpand.c b/src/cmdexpand.c index 1008bf9..8d8bf06 100644 --- a/src/cmdexpand.c +++ b/src/cmdexpand.c @@ -437,6 +437,28 @@ cmdline_compl_startcol(void) return compl_startcol; } +/* + * Returns the current cmdline completion pattern. + */ + char_u * +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. + */ + int +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 a status match. * These are backslashes used for escaping. Do show backslashes in help tags. -- cgit v1.2.3