0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 9.1.0495: Matched text isn't highlighted in cmdline pum

Problem:  Matched text isn't highlighted in cmdline pum.
Solution: Use cmdline completion pattern in cmdline mode.
          (zeertzjq)

closes: #15029

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq
2024-06-17 18:25:32 +02:00
committed by Christian Brabandt
parent 84ac2126f4
commit d8c9340fc6
12 changed files with 132 additions and 5 deletions

View File

@@ -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.