Extend customlist completion so each returned list item may be a Dict with word (required) plus optional abbr, kind, menu, and info keys, surfaced through the cmdline pum the same way complete() does in insert mode. String items keep working as before.
https://github.com/vim/vim/pull/20100
(4 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
@mattn pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@mattn pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
That would be a great improvement! Thank you!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
@chrisbra commented on this pull request.
Thanks, but I have some comments, see below
In src/cmdexpand.c:
> + if (xp->xp_files_kind != NULL)
+ {
+ FreeWild(numMatches, xp->xp_files_kind);
+ xp->xp_files_kind = NULL;
+ }
+ if (xp->xp_files_menu != NULL)
+ {
+ FreeWild(numMatches, xp->xp_files_menu);
+ xp->xp_files_menu = NULL;
+ }
+ if (xp->xp_files_info != NULL)
+ {
+ FreeWild(numMatches, xp->xp_files_info);
+ xp->xp_files_info = NULL;
+ }
+ }
That part is duplicated 3 times. Can you move it into a helper function?
In src/cmdexpand.c:
> - p = vim_strsave(li->li_tv.vval.v_string); if (p == NULL) break;
So if we went into the VAR_DICT case above and allocating to p fails, this leaks abbr, kind, menu and info.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()