aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-11-11 10:59:01 -0500
committerJames McCoy <jamessan@jamessan.com>2016-11-11 11:37:42 -0500
commit7baa96b71753baa0b9c0f1c60c9a697c40bd58e7 (patch)
tree474589f8e2803269c1a43b1e731adb6f9edcc17a /src
parent0213e99aaf6eba303fd459183dd14a4a11cc5b07 (diff)
downloadrneovim-7baa96b71753baa0b9c0f1c60c9a697c40bd58e7.tar.gz
rneovim-7baa96b71753baa0b9c0f1c60c9a697c40bd58e7.tar.bz2
rneovim-7baa96b71753baa0b9c0f1c60c9a697c40bd58e7.zip
vim-patch:7.4.1591
Problem: The quickfix title is truncated. Solution: Save the command before it is truncated. (Anton Lindqvist) https://github.com/vim/vim/commit/5584df65a0ca2315d1eebc13c54a448bee4d0758
Diffstat (limited to 'src')
-rw-r--r--src/nvim/quickfix.c4
-rw-r--r--src/nvim/version.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index f23037613b..d6697902ef 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -2970,6 +2970,7 @@ void ex_vimgrep(exarg_T *eap)
/* Get the search pattern: either white-separated or enclosed in // */
regmatch.regprog = NULL;
+ char_u *title = vim_strsave(*eap->cmdlinep);
p = skip_vimgrep_pat(eap->arg, &s, &flags);
if (p == NULL) {
EMSG(_(e_invalpat));
@@ -3001,7 +3002,7 @@ void ex_vimgrep(exarg_T *eap)
&& eap->cmdidx != CMD_vimgrepadd && eap->cmdidx != CMD_lvimgrepadd)
|| qi->qf_curlist == qi->qf_listcount) {
// make place for a new list
- qf_new_list(qi, *eap->cmdlinep);
+ qf_new_list(qi, title != NULL ? title : *eap->cmdlinep);
} else if (qi->qf_lists[qi->qf_curlist].qf_count > 0) {
// Adding to existing list, find last entry.
for (prevp = qi->qf_lists[qi->qf_curlist].qf_start;
@@ -3229,6 +3230,7 @@ void ex_vimgrep(exarg_T *eap)
}
theend:
+ xfree(title);
xfree(dirname_now);
xfree(dirname_start);
xfree(target_dir);
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 055a997cd4..67487ed253 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -853,7 +853,7 @@ static int included_patches[] = {
// 1594 NA
// 1593 NA
1592,
- // 1591,
+ 1591,
// 1590,
// 1589,
1588,