Patch 8.0.1519
Problem:    Getchangelist() does not use argument as bufname().
Solution:   Use get_buf_tv(). (Yegappan Lakshmanan, closes #2641)
Files:      src/evalfunc.c, src/testdir/test_changelist.vim


*** ../vim-8.0.1518/src/evalfunc.c      2018-02-13 13:59:42.191667272 +0100
--- src/evalfunc.c      2018-02-13 19:03:06.154845452 +0100
***************
*** 4365,4371 ****
        return;
  
  #ifdef FEAT_JUMPLIST
!     buf = find_buffer(&argvars[0]);
      if (buf == NULL)
        return;
  
--- 4365,4374 ----
        return;
  
  #ifdef FEAT_JUMPLIST
!     (void)get_tv_number(&argvars[0]);     /* issue errmsg if type error */
!     ++emsg_off;
!     buf = get_buf_tv(&argvars[0], FALSE);
!     --emsg_off;
      if (buf == NULL)
        return;
  
*** ../vim-8.0.1518/src/testdir/test_changelist.vim     2018-02-13 
13:59:42.191667272 +0100
--- src/testdir/test_changelist.vim     2018-02-13 19:05:33.469595003 +0100
***************
*** 9,15 ****
    bwipe!
    enew
    call assert_equal([], getchangelist(10))
!   call assert_equal([[], 0], getchangelist(bufnr('%')))
  
    call writefile(['line1', 'line2', 'line3'], 'Xfile1.txt')
    call writefile(['line1', 'line2', 'line3'], 'Xfile2.txt')
--- 9,15 ----
    bwipe!
    enew
    call assert_equal([], getchangelist(10))
!   call assert_equal([[], 0], getchangelist('%'))
  
    call writefile(['line1', 'line2', 'line3'], 'Xfile1.txt')
    call writefile(['line1', 'line2', 'line3'], 'Xfile2.txt')
***************
*** 23,29 ****
              \ {'lnum' : 2, 'col' : 4, 'coladd' : 0},
              \ {'lnum' : 4, 'col' : 4, 'coladd' : 0},
              \ {'lnum' : 6, 'col' : 4, 'coladd' : 0}], 2],
!             \ getchangelist(bufnr('%')))
  
    hide edit Xfile2.txt
    exe "normal 1GOline\<C-G>u1.0"
--- 23,29 ----
              \ {'lnum' : 2, 'col' : 4, 'coladd' : 0},
              \ {'lnum' : 4, 'col' : 4, 'coladd' : 0},
              \ {'lnum' : 6, 'col' : 4, 'coladd' : 0}], 2],
!             \ getchangelist('%'))
  
    hide edit Xfile2.txt
    exe "normal 1GOline\<C-G>u1.0"
***************
*** 31,37 ****
    call assert_equal([[
              \ {'lnum' : 1, 'col' : 6, 'coladd' : 0},
              \ {'lnum' : 3, 'col' : 6, 'coladd' : 0}], 2],
!             \ getchangelist(bufnr('%')))
    hide enew
  
    call assert_equal([[
--- 31,37 ----
    call assert_equal([[
              \ {'lnum' : 1, 'col' : 6, 'coladd' : 0},
              \ {'lnum' : 3, 'col' : 6, 'coladd' : 0}], 2],
!             \ getchangelist('%'))
    hide enew
  
    call assert_equal([[
*** ../vim-8.0.1518/src/version.c       2018-02-13 18:05:14.080439478 +0100
--- src/version.c       2018-02-13 19:05:53.193430720 +0100
***************
*** 773,774 ****
--- 773,776 ----
  {   /* Add new patch number below this line */
+ /**/
+     1519,
  /**/

-- 
Advice to worms:  Sleep late.

 /// Bram Moolenaar -- b...@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    ///

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui