list_features(): Hack around infinite loop.

msg_putchar() is not updating msg_col, this causes an infinite loop. Observed
with execute('version') *nested* in another execute(), in particular this line:
    let buildtype = matchstr(execute('version'), '\v\cbuild type:?\s*[^\n\r\t ]+')
when called by :CheckHealth (see runtime/autoload/health/nvim ..
s:check_performance()).

But invoking some variation of execute('...execute("version")') is not enough to
provoke the bug, maybe it needs to be in a user function?
This commit is contained in:
Justin M. Keyes 2016-10-25 15:33:57 +02:00
parent c853fd6fab
commit e8ddbbdf07

View File

@ -2570,7 +2570,11 @@ static void list_features(void)
}
} else {
while (msg_col % width) {
int old_msg_col = msg_col;
msg_putchar(' ');
if (old_msg_col == msg_col) {
break; // XXX: Avoid infinite loop.
}
}
}
} else {