mirror of
https://github.com/neovim/neovim.git
synced 2025-09-08 12:28:18 +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
|
||||
*trunc_p = '<';
|
||||
|
||||
// Advance the pointer to the end of the string
|
||||
trunc_p = trunc_p + STRLEN(trunc_p);
|
||||
if (width + 1 < maxwidth) {
|
||||
// Advance the pointer to the end of the string
|
||||
trunc_p = trunc_p + STRLEN(trunc_p);
|
||||
}
|
||||
|
||||
// Fill up for half a double-wide character.
|
||||
while (++width < maxwidth) {
|
||||
|
Reference in New Issue
Block a user