vim-patch:7.4.1949

Problem:    Minor problems with the quickfix code.
Solution:   Fix the problems. (Yegappan Lakshmanan)

38df43bd13
This commit is contained in:
James McCoy
2016-12-12 15:05:38 -05:00
parent 2244253c14
commit 63d4ac7b25
3 changed files with 8 additions and 7 deletions

View File

@@ -541,11 +541,12 @@ 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 = STRLEN(p_buf); len = STRLEN(p_buf);
if (linelen > IOSIZE - 2) { if (len > IOSIZE - 2) {
linebuf = qf_grow_linebuf(&growbuf, &growbufsiz, len, &linelen); linebuf = qf_grow_linebuf(&growbuf, &growbufsiz, len, &linelen);
} else { } else {
linebuf = IObuff; linebuf = IObuff;
linelen = len;
} }
STRLCPY(linebuf, p_buf, linelen + 1); STRLCPY(linebuf, p_buf, linelen + 1);
} }
@@ -1238,10 +1239,8 @@ static int qf_get_fnum(char_u *directory, char_u *fname)
return buf->b_fnum; return buf->b_fnum;
} }
/* // 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 *qf_push_dir(char_u *dirbuf, struct dir_stack_T **stackptr) static char_u *qf_push_dir(char_u *dirbuf, struct dir_stack_T **stackptr)
{ {
struct dir_stack_T *ds_ptr; struct dir_stack_T *ds_ptr;

View File

@@ -635,6 +635,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

@@ -491,7 +491,7 @@ static int included_patches[] = {
1952, 1952,
// 1951 NA // 1951 NA
// 1950, // 1950,
// 1949, 1949,
// 1948, // 1948,
// 1947 NA // 1947 NA
// 1946 NA // 1946 NA