mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
screen.c: account for translated string length
`[RO]` is appended to the status line and `len` is increased with the length of this string (4). However, the string is marked for translation and may thus well be larger (or smaller) than 4. Therefore, we check the length at runtime. The resulting len is never actually used, and thus could be removed. However, by keeping this line, the body of this if-statement is kept consistent with surrounding code, and future changes can not forget to add this line when additional strings are added to p.
This commit is contained in:
parent
ddab4661f7
commit
04fb65fd76
@ -4876,7 +4876,7 @@ void win_redr_status(win_T *wp)
|
||||
}
|
||||
if (wp->w_buffer->b_p_ro) {
|
||||
STRCPY(p + len, _("[RO]"));
|
||||
len += 4;
|
||||
len += (int)STRLEN(p + len);
|
||||
}
|
||||
|
||||
this_ru_col = ru_col - (Columns - wp->w_width);
|
||||
|
Loading…
Reference in New Issue
Block a user