[vim/vim] highlight groups PmenuMatch and PmenuMatchSel some buggy (Issue #15021)

19 views
Skip to first unread message

Shane-XB-Qian

unread,
Jun 16, 2024, 5:48:14 AM (10 days ago) Jun 16
to vim/vim, Subscribed

Steps to reproduce

  1. do not expect icase of match:
    image.png (view on web)

  2. did not reflect the change of base:
    // os.if -> the i highlighted -> changed to os.i which backspace the f -> the i highlight missed.
    image.png (view on web)

Expected behaviour

work.

Version of Vim

v9.1.493

Environment

linux

Logs and stack traces

#14694


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021@github.com>

Shane-XB-Qian

unread,
Jun 16, 2024, 7:24:06 AM (10 days ago) Jun 16
to vim/vim, Subscribed

if ok, let me know if was intended to design like that, then let it be..


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021/2171446431@github.com>

Shane-XB-Qian

unread,
Jun 16, 2024, 7:28:01 AM (10 days ago) Jun 16
to vim/vim, Subscribed

@glepnir if ok, let me know if was intended to design like that, then let it be..


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021/2171449162@github.com>

Shane-XB-Qian

unread,
Jun 16, 2024, 7:31:13 AM (10 days ago) Jun 16
to vim/vim, Subscribed

and @chrisbra what do you think?
i supposed this two hl groups fit for genenral compl, not regarding to fuzzy or something as seems you said somewhere.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021/2171450140@github.com>

glepnir

unread,
Jun 16, 2024, 7:34:16 AM (10 days ago) Jun 16
to vim/vim, Subscribed

emm a simple reprodcue script will be useful


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021/2171455827@github.com>

Shane-XB-Qian

unread,
Jun 16, 2024, 7:47:54 AM (10 days ago) Jun 16
to vim/vim, Subscribed

and @chrisbra what do you think?

i supposed this two hl groups fit for any compl, and not regarding to fuzzy or something, as seems you said somewhere.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021/2171467028@github.com>

glepnir

unread,
Jun 16, 2024, 7:49:18 AM (10 days ago) Jun 16
to vim/vim, Subscribed

diff --git a/src/insexpand.c b/src/insexpand.c
index 28e4d344e..c673df927 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -1448,7 +1448,7 @@ ins_compl_show_pum(void)
     char_u *
 ins_compl_leader(void)
 {
-    return compl_leader;
+    return compl_leader != NULL ? compl_leader : compl_orig_text;
 }

 /*

could you try this patch.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021/2171467330@github.com>

Shane-XB-Qian

unread,
Jun 16, 2024, 7:50:41 AM (10 days ago) Jun 16
to vim/vim, Subscribed

and @chrisbra what do you think?
i supposed this two hl groups fit for any compl, and not regarding to fuzzy or something, as seems you said somewhere.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021/2171467677@github.com>

glepnir

unread,
Jun 16, 2024, 7:54:55 AM (10 days ago) Jun 16
to vim/vim, Subscribed

you publish duplicate comments.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021/2171468973@github.com>

Shane-XB-Qian

unread,
Jun 16, 2024, 7:57:18 AM (10 days ago) Jun 16
to vim/vim, Subscribed

you publish duplicate comments.

yea~ sry, we are living in the great cn, sry for the wonderful network~ 😅


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021/2171470019@github.com>

Shane-XB-Qian

unread,
Jun 16, 2024, 7:57:50 AM (10 days ago) Jun 16
to vim/vim, Subscribed

could you try this patch.

yes, the item 2 seems worked after this patch
// item 1 remained.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021/2171470173@github.com>

glepnir

unread,
Jun 16, 2024, 8:00:37 AM (10 days ago) Jun 16
to vim/vim, Subscribed

okay good to knwo. I am still finding a way to reproduce the peoblem 1.. could you provide more information about problem 1


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021/2171470807@github.com>

zeertzjq

unread,
Jun 16, 2024, 8:00:37 AM (10 days ago) Jun 16
to vim/vim, Subscribed

It may be necessary to store the start and the end of the matched position when using non-fuzzy completion, so that highlighting of matched text works when using 'ignorecase', but I'm not entirely sure about that. That'll also be required to highlight matched text for cmdline non-fuzzy completion, as in cmdline completion the pattern can contain wildcards.

Speaking of that, should matched text be highlighted for cmdline completion as well?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021/2171470803@github.com>

Shane-XB-Qian

unread,
Jun 16, 2024, 8:03:38 AM (10 days ago) Jun 16
to vim/vim, Subscribed

i have not tried to use fuzzy of completeopt yet, but generally fuzzy should be same like the case ignored.
// it is not the caseignore, but the icase of compl items attribute.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021/2171471928@github.com>

glepnir

unread,
Jun 16, 2024, 8:04:00 AM (10 days ago) Jun 16
to vim/vim, Subscribed

ins_compl_bs then invoke ins_compl_free it free leader like currently leader is cl both freed. so when bs a leader the ins_compl_leader get a null pointer then nothing highlighted. but the compl_orig_text keep the original value.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021/2171472359@github.com>

glepnir

unread,
Jun 16, 2024, 8:04:47 AM (10 days ago) Jun 16
to vim/vim, Subscribed

i have not tried to use fuzzy of completeopt yet, but generally fuzzy should be same like the case ignored. // it is not the caseignore, but the icase of compl items attribute.

you mean the problem 1 is run with the completeopt no fuzzy right ?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021/2171474026@github.com>

Shane-XB-Qian

unread,
Jun 16, 2024, 8:08:03 AM (10 days ago) Jun 16
to vim/vim, Subscribed

no, it is not regarding to fuzzy of completeopt option, or to fuzzy as common sense usually its case was not matter.
icase is a complete_item attribute.
// not sure pum in cmdline, it maybe no icase attribute.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021/2171482135@github.com>

glepnir

unread,
Jun 16, 2024, 8:10:21 AM (10 days ago) Jun 16
to vim/vim, Subscribed

could you please provide a reproduce step with a mininal config ..


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021/2171491596@github.com>

glepnir

unread,
Jun 16, 2024, 8:14:06 AM (10 days ago) Jun 16
to vim/vim, Subscribed

reproduced.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021/2171493911@github.com>

glepnir

unread,
Jun 16, 2024, 8:21:05 AM (10 days ago) Jun 16
to vim/vim, Subscribed

Speaking of that, should matched text be highlighted for cmdline completion as well?

should be :)


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021/2171498133@github.com>

Shane-XB-Qian

unread,
Jun 16, 2024, 8:31:46 AM (10 days ago) Jun 16
to vim/vim, Subscribed

Speaking of that, should matched text be highlighted for cmdline completion as well?

i donot know, i am not a fan of pum in cli, i usually like its behavior as in bash cli.
// but as i know @yegappan impl it as different way like insert-compl, it should be some different?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15021/2171512012@github.com>

Christian Brabandt

unread,
Jun 17, 2024, 12:39:30 PM (9 days ago) Jun 17
to vim/vim, Subscribed

Closed #15021 as completed via f189138.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/15021/issue_event/13188540295@github.com>

Reply all
Reply to author
Forward
0 new messages