aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-12-12 15:05:38 -0500
committerJames McCoy <jamessan@jamessan.com>2016-12-27 14:10:27 -0500
commit63d4ac7b2515072bffabe1d69fd6eb62aeb860f4 (patch)
tree71a742ff15c0f476388b825f463b1a8eec39a173
parent2244253c14193be94dac4b40a24dcea56e1f1b15 (diff)
downloadrneovim-63d4ac7b2515072bffabe1d69fd6eb62aeb860f4.tar.gz
rneovim-63d4ac7b2515072bffabe1d69fd6eb62aeb860f4.tar.bz2
rneovim-63d4ac7b2515072bffabe1d69fd6eb62aeb860f4.zip
vim-patch:7.4.1949
Problem: Minor problems with the quickfix code. Solution: Fix the problems. (Yegappan Lakshmanan) https://github.com/vim/vim/commit/38df43bd13a2498cc96b3ddd9a20dd75126bd171
-rw-r--r--src/nvim/quickfix.c11
-rw-r--r--src/nvim/testdir/test_quickfix.vim2
-rw-r--r--src/nvim/version.c2
3 files changed, 8 insertions, 7 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;
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim
index 025f26059f..bfdce9cd38 100644
--- a/src/nvim/testdir/test_quickfix.vim
+++ b/src/nvim/testdir/test_quickfix.vim
@@ -635,6 +635,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/nvim/version.c b/src/nvim/version.c
index f9385dcc93..480e6723f3 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -491,7 +491,7 @@ static int included_patches[] = {
1952,
// 1951 NA
// 1950,
- // 1949,
+ 1949,
// 1948,
// 1947 NA
// 1946 NA