diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-06-20 21:41:12 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-06-20 21:41:12 +0200 |
commit | 38df43bd13a2498cc96b3ddd9a20dd75126bd171 (patch) | |
tree | 504438d6a2b1a0d13a71545a4082a5f6e3c66bf8 /src | |
parent | ad5ca9bc1e7145474adb082775a805f1731e9e37 (diff) |
patch 7.4.1949v7.4.1949
Problem: Minor problems with the quickfix code.
Solution: Fix the problems. (Yegappan Lakshmanan)
Diffstat (limited to 'src')
-rw-r--r-- | src/quickfix.c | 11 | ||||
-rw-r--r-- | src/testdir/test_quickfix.vim | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/quickfix.c b/src/quickfix.c index b72f7d1f68..e424593965 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -623,8 +623,8 @@ qf_init_ext( if (buflnum > lnumlast) break; p_buf = ml_get_buf(buf, buflnum++, FALSE); - linelen = (int)STRLEN(p_buf); - if (linelen > IOSIZE - 2) + len = (int)STRLEN(p_buf); + if (len > IOSIZE - 2) { linebuf = qf_grow_linebuf(&growbuf, &growbufsiz, len, &linelen); @@ -632,7 +632,10 @@ qf_init_ext( goto qf_init_end; } else + { linebuf = IObuff; + linelen = len; + } 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 - * NULL on error + * Push dirbuf onto the directory stack and return pointer to actual dir or + * NULL on error. */ static char_u * qf_push_dir(char_u *dirbuf, struct dir_stack_T **stackptr) diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim index 380d64bd94..56bf9cb28f 100644 --- a/src/testdir/test_quickfix.vim +++ b/src/testdir/test_quickfix.vim @@ -653,6 +653,8 @@ endfunction " Test for quickfix directory stack support function! s:dir_stack_tests(cchar) + call s:setup_commands(a:cchar) + let save_efm=&efm set efm=%DEntering\ dir\ '%f',%f:%l:%m,%XLeaving\ dir\ '%f' diff --git a/src/version.c b/src/version.c index 72f4c01202..a99c93f1e5 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1949, +/**/ 1948, /**/ 1947, |