mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.0.0706: crash when cancelling the cmdline window in Ex mode
Problem: Crash when cancelling the cmdline window in Ex mode. (James McCoy) Solution: Do not set cmdbuff to NULL, make it empty.
This commit is contained in:
@@ -7042,7 +7042,13 @@ open_cmdwin(void)
|
||||
else
|
||||
ccline.cmdbuff = vim_strsave(ml_get_curline());
|
||||
if (ccline.cmdbuff == NULL)
|
||||
{
|
||||
ccline.cmdbuff = vim_strsave((char_u *)"");
|
||||
ccline.cmdlen = 0;
|
||||
ccline.cmdbufflen = 1;
|
||||
ccline.cmdpos = 0;
|
||||
cmdwin_result = Ctrl_C;
|
||||
}
|
||||
else
|
||||
{
|
||||
ccline.cmdlen = (int)STRLEN(ccline.cmdbuff);
|
||||
|
@@ -764,6 +764,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
706,
|
||||
/**/
|
||||
705,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user