mirror of
https://github.com/neovim/neovim.git
synced 2025-09-23 19:48:32 +00:00
vim-patch:7.4.562 #2593
Problem: Segfault with wide screen and error in 'rulerformat'. (Ingo Karkat) Solution: Check there is enough space. (Christian Brabandt) https://github.com/vim/vim/commit/v7-4-562
This commit is contained in:

committed by
Justin M. Keyes

parent
f525284778
commit
7a7d082e12
@@ -7106,7 +7106,8 @@ static void win_redr_ruler(win_T *wp, int always)
|
||||
if (this_ru_col < (width + 1) / 2)
|
||||
this_ru_col = (width + 1) / 2;
|
||||
if (this_ru_col + o < width) {
|
||||
while (this_ru_col + o < width) {
|
||||
// Need at least 3 chars left for get_rel_pos() + NUL.
|
||||
while (this_ru_col + o < width && RULER_BUF_LEN > i + 4) {
|
||||
if (has_mbyte)
|
||||
i += (*mb_char2bytes)(fillchar, buffer + i);
|
||||
else
|
||||
|
Reference in New Issue
Block a user