patch 9.1.1296: completion: incorrect truncation logic

Problem:  completion: incorrect truncation logic (after: v9.1.1284)
Solution: replace string allocation with direct screen rendering and
          fixe RTL/LTR truncation calculations (glepnir)

closes: #17081

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
glepnir
2025-04-12 18:35:34 +02:00
committed by Christian Brabandt
parent cf665ccd37
commit d4dbf822dc
9 changed files with 69 additions and 61 deletions

View File

@ -4714,6 +4714,7 @@ static struct charstab filltab[] =
CHARSTAB_ENTRY(&fill_chars.eob, "eob"),
CHARSTAB_ENTRY(&fill_chars.lastline, "lastline"),
CHARSTAB_ENTRY(&fill_chars.trunc, "trunc"),
CHARSTAB_ENTRY(&fill_chars.truncrl, "truncrl"),
};
static lcs_chars_T lcs_chars;
static struct charstab lcstab[] =
@ -4828,6 +4829,7 @@ set_chars_option(win_T *wp, char_u *value, int is_listchars, int apply,
fill_chars.eob = '~';
fill_chars.lastline = '@';
fill_chars.trunc = '>';
fill_chars.truncrl = '<';
}
}
p = value;