0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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 #4102)
This commit is contained in:
Bram Moolenaar
2019-06-09 16:40:46 +02:00
parent 541faf7a73
commit 954bb06363
2 changed files with 5 additions and 3 deletions

View File

@@ -1447,9 +1447,9 @@ 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;

View File

@@ -777,6 +777,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1509,
/**/
1508,
/**/