mirror of
https://github.com/neovim/neovim.git
synced 2025-09-10 05:18:16 +00:00
statusline: Check width before advancing pointer. #3818
Closes #3763 Helped-by: oni-link <knil.ino@gmail.com>
This commit is contained in:

committed by
Justin M. Keyes

parent
fcf829963e
commit
81960df9f5
@@ -3745,8 +3745,10 @@ int build_stl_str_hl(
|
|||||||
// Put a `<` to mark where we truncated at
|
// Put a `<` to mark where we truncated at
|
||||||
*trunc_p = '<';
|
*trunc_p = '<';
|
||||||
|
|
||||||
// Advance the pointer to the end of the string
|
if (width + 1 < maxwidth) {
|
||||||
trunc_p = trunc_p + STRLEN(trunc_p);
|
// Advance the pointer to the end of the string
|
||||||
|
trunc_p = trunc_p + STRLEN(trunc_p);
|
||||||
|
}
|
||||||
|
|
||||||
// Fill up for half a double-wide character.
|
// Fill up for half a double-wide character.
|
||||||
while (++width < maxwidth) {
|
while (++width < maxwidth) {
|
||||||
|
Reference in New Issue
Block a user