To: vim_dev@googlegroups.com Subject: Patch 7.4.1949 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1949 Problem: Minor problems with the quickfix code. Solution: Fix the problems. (Yegappan Lakshmanan) Files: src/quickfix.c, src/testdir/test_quickfix.vim *** ../vim-7.4.1948/src/quickfix.c 2016-06-03 19:05:37.291245033 +0200 --- src/quickfix.c 2016-06-20 21:38:22.300670280 +0200 *************** *** 623,630 **** if (buflnum > lnumlast) break; p_buf = ml_get_buf(buf, buflnum++, FALSE); ! linelen = (int)STRLEN(p_buf); ! if (linelen > IOSIZE - 2) { linebuf = qf_grow_linebuf(&growbuf, &growbufsiz, len, &linelen); --- 623,630 ---- if (buflnum > lnumlast) break; p_buf = ml_get_buf(buf, buflnum++, FALSE); ! len = (int)STRLEN(p_buf); ! if (len > IOSIZE - 2) { linebuf = qf_grow_linebuf(&growbuf, &growbufsiz, len, &linelen); *************** *** 632,638 **** --- 632,641 ---- goto qf_init_end; } else + { linebuf = IObuff; + linelen = len; + } vim_strncpy(linebuf, p_buf, linelen); } } *************** *** 1435,1442 **** } /* ! * 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) --- 1438,1445 ---- } /* ! * 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) *** ../vim-7.4.1948/src/testdir/test_quickfix.vim 2016-06-15 22:41:27.464826483 +0200 --- src/testdir/test_quickfix.vim 2016-06-20 21:38:00.344907814 +0200 *************** *** 653,658 **** --- 653,660 ---- " 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' *** ../vim-7.4.1948/src/version.c 2016-06-20 21:26:03.284671508 +0200 --- src/version.c 2016-06-20 21:39:12.968122156 +0200 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 1949, /**/ -- An actual excerpt from a classified section of a city newspaper: "Illiterate? Write today for free help!" /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///