aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r--src/nvim/quickfix.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index 9b2dbf1bf5..16d336c41f 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -541,11 +541,12 @@ qf_init_ext (
if (buflnum > lnumlast)
break;
p_buf = ml_get_buf(buf, buflnum++, false);
- linelen = STRLEN(p_buf);
- if (linelen > IOSIZE - 2) {
+ len = STRLEN(p_buf);
+ if (len > IOSIZE - 2) {
linebuf = qf_grow_linebuf(&growbuf, &growbufsiz, len, &linelen);
} else {
linebuf = IObuff;
+ linelen = len;
}
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;
}
-/*
- * 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)
{
struct dir_stack_T *ds_ptr;