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

patch 7.4.1949

Problem:    Minor problems with the quickfix code.
Solution:   Fix the problems. (Yegappan Lakshmanan)
This commit is contained in:
Bram Moolenaar
2016-06-20 21:41:12 +02:00
parent ad5ca9bc1e
commit 38df43bd13
3 changed files with 11 additions and 4 deletions

View File

@@ -623,8 +623,8 @@ qf_init_ext(
if (buflnum > lnumlast) if (buflnum > lnumlast)
break; break;
p_buf = ml_get_buf(buf, buflnum++, FALSE); p_buf = ml_get_buf(buf, buflnum++, FALSE);
linelen = (int)STRLEN(p_buf); len = (int)STRLEN(p_buf);
if (linelen > IOSIZE - 2) if (len > IOSIZE - 2)
{ {
linebuf = qf_grow_linebuf(&growbuf, &growbufsiz, len, linebuf = qf_grow_linebuf(&growbuf, &growbufsiz, len,
&linelen); &linelen);
@@ -632,7 +632,10 @@ qf_init_ext(
goto qf_init_end; goto qf_init_end;
} }
else else
{
linebuf = IObuff; linebuf = IObuff;
linelen = len;
}
vim_strncpy(linebuf, p_buf, linelen); vim_strncpy(linebuf, p_buf, linelen);
} }
} }
@@ -1435,8 +1438,8 @@ qf_get_fnum(char_u *directory, char_u *fname)
} }
/* /*
* push dirbuf onto the directory stack and return pointer to actual dir or * Push dirbuf onto the directory stack and return pointer to actual dir or
* NULL on error * NULL on error.
*/ */
static char_u * static char_u *
qf_push_dir(char_u *dirbuf, struct dir_stack_T **stackptr) qf_push_dir(char_u *dirbuf, struct dir_stack_T **stackptr)

View File

@@ -653,6 +653,8 @@ endfunction
" Test for quickfix directory stack support " Test for quickfix directory stack support
function! s:dir_stack_tests(cchar) function! s:dir_stack_tests(cchar)
call s:setup_commands(a:cchar)
let save_efm=&efm let save_efm=&efm
set efm=%DEntering\ dir\ '%f',%f:%l:%m,%XLeaving\ dir\ '%f' set efm=%DEntering\ dir\ '%f',%f:%l:%m,%XLeaving\ dir\ '%f'

View File

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