mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 13:38:34 +00:00
vim-patch:9.1.1284: not possible to configure pum truncation char
Problem: not possible to configure the completion menu truncation
character
Solution: add the "trunc" suboption to the 'fillchars' setting to
configure the truncation indicator (glepnir).
closes: vim/vim#17006
b87620466c
Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
@@ -2132,6 +2132,7 @@ static const struct chars_tab fcs_tab[] = {
|
||||
CHARSTAB_ENTRY(&fcs_chars.msgsep, "msgsep", " ", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.eob, "eob", "~", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.lastline, "lastline", "@", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.trunc, "trunc", ">", NULL),
|
||||
};
|
||||
|
||||
static lcs_chars_T lcs_chars;
|
||||
@@ -2237,6 +2238,7 @@ const char *set_chars_option(win_T *wp, const char *value, CharsOption what, boo
|
||||
}
|
||||
|
||||
const char *s = p + tab[i].name.size + 1;
|
||||
|
||||
if (what == kListchars && strcmp(tab[i].name.data, "multispace") == 0) {
|
||||
if (round == 0) {
|
||||
// Get length of lcs-multispace string in the first round
|
||||
@@ -2257,7 +2259,6 @@ const char *set_chars_option(win_T *wp, const char *value, CharsOption what, boo
|
||||
e_wrong_number_of_characters_for_field_str,
|
||||
tab[i].name.data);
|
||||
}
|
||||
p = s;
|
||||
} else {
|
||||
int multispace_pos = 0;
|
||||
while (*s != NUL && *s != ',') {
|
||||
@@ -2266,14 +2267,14 @@ const char *set_chars_option(win_T *wp, const char *value, CharsOption what, boo
|
||||
lcs_chars.multispace[multispace_pos++] = c1;
|
||||
}
|
||||
}
|
||||
p = s;
|
||||
}
|
||||
p = s;
|
||||
break;
|
||||
}
|
||||
|
||||
if (what == kListchars && strcmp(tab[i].name.data, "leadmultispace") == 0) {
|
||||
if (round == 0) {
|
||||
// get length of lcs-leadmultispace string in first round
|
||||
// Get length of lcs-leadmultispace string in first round
|
||||
last_lmultispace = p;
|
||||
lead_multispace_len = 0;
|
||||
while (*s != NUL && *s != ',') {
|
||||
@@ -2291,7 +2292,6 @@ const char *set_chars_option(win_T *wp, const char *value, CharsOption what, boo
|
||||
e_wrong_number_of_characters_for_field_str,
|
||||
tab[i].name.data);
|
||||
}
|
||||
p = s;
|
||||
} else {
|
||||
int multispace_pos = 0;
|
||||
while (*s != NUL && *s != ',') {
|
||||
@@ -2300,8 +2300,8 @@ const char *set_chars_option(win_T *wp, const char *value, CharsOption what, boo
|
||||
lcs_chars.leadmultispace[multispace_pos++] = c1;
|
||||
}
|
||||
}
|
||||
p = s;
|
||||
}
|
||||
p = s;
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user