]> granicus.if.org Git - vim/commitdiff
patch 7.4.1949 v7.4.1949
authorBram Moolenaar <Bram@vim.org>
Mon, 20 Jun 2016 19:41:12 +0000 (21:41 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 20 Jun 2016 19:41:12 +0000 (21:41 +0200)
Problem:    Minor problems with the quickfix code.
Solution:   Fix the problems. (Yegappan Lakshmanan)

src/quickfix.c
src/testdir/test_quickfix.vim
src/version.c

index b72f7d1f681e0e70e30296b2b83966a13430b42e..e424593965b679e3fcea5a55716c129efeb1cba6 100644 (file)
@@ -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)
index 380d64bd94c83db2b8aada5d8fd9dc5426445d71..56bf9cb28f2d470e6b917e4de6a802b7c6cd9b4a 100644 (file)
@@ -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'
 
index 72f4c01202910c6451beacf5f56c2374d3bbfeff..a99c93f1e5b73bb5074be6cecbb44ff73e097244 100644 (file)
@@ -753,6 +753,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1949,
 /**/
     1948,
 /**/