Patch 8.0.1678
Problem:    Errorformat "%r" implies "%>". (Jan Gosmann)
Solution:   Jump to before setting fmt_ptr. (Yegappan Lakshmanan,
            closes #2785)
Files:      src/quickfix.c, src/testdir/test_quickfix.vim


*** ../vim-8.0.1677/src/quickfix.c      2018-04-06 22:58:18.758068138 +0200
--- src/quickfix.c      2018-04-08 13:24:27.946819132 +0200
***************
*** 844,849 ****
--- 844,850 ----
      /* Always ignore case when looking for a matching error. */
      regmatch.rm_ic = TRUE;
  
+ restofline:
      /* If there was no %> item start at the first pattern */
      if (fmt_start == NULL)
        fmt_ptr = fmt_first;
***************
*** 858,864 ****
       * match or no match.
       */
      fields->valid = TRUE;
- restofline:
      for ( ; fmt_ptr != NULL; fmt_ptr = fmt_ptr->next)
      {
        int r;
--- 859,864 ----
*** ../vim-8.0.1677/src/testdir/test_quickfix.vim       2018-04-06 
22:58:18.758068138 +0200
--- src/testdir/test_quickfix.vim       2018-04-08 13:24:04.410982698 +0200
***************
*** 2582,2587 ****
--- 2582,2610 ----
    call assert_equal(3, l1.items[1].lnum)
    call assert_equal('two.txt', bufname(l2.items[1].bufnr))
    call assert_equal(5, l2.items[1].lnum)
+ 
+   " Test for start of a new error line in the same line where a previous
+   " error line ends with a file stack.
+   let efm_val = 'Error\ l%l\ in\ %f,'
+   let efm_val .= '%-P%>(%f%r,Error\ l%l\ in\ %m,%-Q)%r'
+   let l = g:Xgetlist({'lines' : [
+             \ '(one.txt',
+             \ 'Error l4 in one.txt',
+             \ ') (two.txt',
+             \ 'Error l6 in two.txt',
+             \ ')',
+             \ 'Error l8 in one.txt'
+             \ ], 'efm' : efm_val})
+   call assert_equal(3, len(l.items))
+   call assert_equal('one.txt', bufname(l.items[0].bufnr))
+   call assert_equal(4, l.items[0].lnum)
+   call assert_equal('one.txt', l.items[0].text)
+   call assert_equal('two.txt', bufname(l.items[1].bufnr))
+   call assert_equal(6, l.items[1].lnum)
+   call assert_equal('two.txt', l.items[1].text)
+   call assert_equal('one.txt', bufname(l.items[2].bufnr))
+   call assert_equal(8, l.items[2].lnum)
+   call assert_equal('', l.items[2].text)
  endfunc
  
  func Test_multifilestack()
*** ../vim-8.0.1677/src/version.c       2018-04-08 13:07:18.746034774 +0200
--- src/version.c       2018-04-08 13:26:13.794083879 +0200
***************
*** 764,765 ****
--- 764,767 ----
  {   /* Add new patch number below this line */
+ /**/
+     1678,
  /**/

-- 
Why is it called "Windows"?  "Gates" would be more appropriate...

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui