mirror of
https://github.com/neovim/neovim.git
synced 2025-01-01 17:23:36 -07:00
vim-patch:8.1.1509: cmdline_row can become negative, causing a crash
Problem: Cmdline_row can become negative, causing a crash.
Solution: Make sure cmdline_row does not become negagive. (closes vim/vim#4102)
954bb06363
This commit is contained in:
parent
1ce28d7d9b
commit
aecbbb0b11
@ -2508,9 +2508,10 @@ int prompt_for_number(int *mouse_used)
|
||||
|
||||
i = get_number(TRUE, mouse_used);
|
||||
if (KeyTyped) {
|
||||
/* don't call wait_return() now */
|
||||
/* msg_putchar('\n'); */
|
||||
cmdline_row = msg_row - 1;
|
||||
// don't call wait_return() now
|
||||
if (msg_row > 0) {
|
||||
cmdline_row = msg_row - 1;
|
||||
}
|
||||
need_wait_return = FALSE;
|
||||
msg_didany = FALSE;
|
||||
msg_didout = FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user