jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.561

073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.561
073263
Fcc: outbox
073263
From: Bram Moolenaar <Bram@moolenaar.net>
073263
Mime-Version: 1.0
073263
Content-Type: text/plain; charset=UTF-8
073263
Content-Transfer-Encoding: 8bit
073263
------------
073263
073263
Patch 7.4.561
073263
Problem:    Ex range handling is wrong for buffer-local user commands.
073263
Solution:   Check for CMD_USER_BUF. (Marcin Szamotulski)
073263
Files:	    src/ex_docmd.c, src/testdir/test_command_count.in,
073263
	    src/testdir/test_command_count.ok
073263
073263
073263
*** ../vim-7.4.560/src/ex_docmd.c	2014-12-08 04:16:26.265702875 +0100
073263
--- src/ex_docmd.c	2015-01-07 13:11:45.740538584 +0100
073263
***************
073263
*** 2133,2144 ****
073263
      if (ea.cmdidx != CMD_SIZE
073263
  #ifdef FEAT_USR_CMDS
073263
  	&& ea.cmdidx != CMD_USER
073263
  #endif
073263
         )
073263
  	ea.addr_type = cmdnames[(int)ea.cmdidx].cmd_addr_type;
073263
      else
073263
  #ifdef FEAT_USR_CMDS
073263
! 	if (ea.cmdidx != CMD_USER)
073263
  #endif
073263
  	ea.addr_type = ADDR_LINES;
073263
      /* ea.addr_type for user commands is set by find_ucmd */
073263
--- 2133,2145 ----
073263
      if (ea.cmdidx != CMD_SIZE
073263
  #ifdef FEAT_USR_CMDS
073263
  	&& ea.cmdidx != CMD_USER
073263
+ 	&& ea.cmdidx != CMD_USER_BUF
073263
  #endif
073263
         )
073263
  	ea.addr_type = cmdnames[(int)ea.cmdidx].cmd_addr_type;
073263
      else
073263
  #ifdef FEAT_USR_CMDS
073263
! 	if (ea.cmdidx != CMD_USER && ea.cmdidx != CMD_USER_BUF)
073263
  #endif
073263
  	ea.addr_type = ADDR_LINES;
073263
      /* ea.addr_type for user commands is set by find_ucmd */
073263
*** ../vim-7.4.560/src/testdir/test_command_count.in	2014-12-08 04:16:26.249703054 +0100
073263
--- src/testdir/test_command_count.in	2015-01-07 13:12:34.099980778 +0100
073263
***************
073263
*** 3,9 ****
073263
  STARTTEST
073263
  :let g:lines = []
073263
  :so tiny.vim
073263
! :com -range RangeLines :call add(g:lines, 'Rangeg:Lines '.<line1>.' '.<line2>)
073263
  :com -range -addr=arguments RangeArguments :call add(g:lines, 'RangeArguments '.<line1>.' '.<line2>)
073263
  :com -range=% -addr=arguments RangeArgumentsAll :call add(g:lines, 'RangeArgumentsAll '.<line1>.' '.<line2>)
073263
  :com -range -addr=loaded_buffers RangeLoadedBuffers :call add(g:lines, 'RangeLoadedBuffers '.<line1>.' '.<line2>)
073263
--- 3,9 ----
073263
  STARTTEST
073263
  :let g:lines = []
073263
  :so tiny.vim
073263
! :com -range=% RangeLines :call add(g:lines, 'RangeLines '.<line1>.' '.<line2>)
073263
  :com -range -addr=arguments RangeArguments :call add(g:lines, 'RangeArguments '.<line1>.' '.<line2>)
073263
  :com -range=% -addr=arguments RangeArgumentsAll :call add(g:lines, 'RangeArgumentsAll '.<line1>.' '.<line2>)
073263
  :com -range -addr=loaded_buffers RangeLoadedBuffers :call add(g:lines, 'RangeLoadedBuffers '.<line1>.' '.<line2>)
073263
***************
073263
*** 42,47 ****
073263
--- 42,53 ----
073263
  :%RangeTabs
073263
  :RangeTabsAll
073263
  :1tabonly
073263
+ :s/\n/\r\r\r\r\r/
073263
+ :2ma<
073263
+ :$-ma>
073263
+ :'<,'>RangeLines
073263
+ :com -range=% -buffer LocalRangeLines :call add(g:lines, 'LocalRangeLines '.<line1>.' '.<line2>)
073263
+ :'<,'>LocalRangeLines
073263
  :e! test.out
073263
  :call append(0, g:lines)
073263
  :w|qa!
073263
*** ../vim-7.4.560/src/testdir/test_command_count.ok	2014-12-08 04:16:26.249703054 +0100
073263
--- src/testdir/test_command_count.ok	2015-01-07 12:59:08.657271709 +0100
073263
***************
073263
*** 14,17 ****
073263
--- 14,19 ----
073263
  RangeTabs 2 5
073263
  RangeTabs 1 5
073263
  RangeTabsAll 1 5
073263
+ RangeLines 2 5
073263
+ LocalRangeLines 2 5
073263
  
073263
*** ../vim-7.4.560/src/version.c	2014-12-17 21:00:44.989871256 +0100
073263
--- src/version.c	2015-01-07 12:58:04.754008894 +0100
073263
***************
073263
*** 743,744 ****
073263
--- 743,746 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     561,
073263
  /**/
073263
073263
-- 
073263
Q: What is a patch 22?
073263
A: A patch you need to include to make it possible to include patches.
073263
073263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
073263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
073263
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
073263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///