Mercurial > vim
changeset 9334:674f9e3ccd1a v7.4.1949
commit https://github.com/vim/vim/commit/38df43bd13a2498cc96b3ddd9a20dd75126bd171
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jun 20 21:41:12 2016 +0200
patch 7.4.1949
Problem: Minor problems with the quickfix code.
Solution: Fix the problems. (Yegappan Lakshmanan)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 20 Jun 2016 21:45:06 +0200 |
parents | df1a801dff77 |
children | 24c0ff5c1778 |
files | src/quickfix.c src/testdir/test_quickfix.vim src/version.c |
diffstat | 3 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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 *f } /* - * 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)