Blame SOURCES/7.4.098

22c937
To: vim_dev@googlegroups.com
22c937
Subject: Patch 7.4.098
22c937
Fcc: outbox
22c937
From: Bram Moolenaar <Bram@moolenaar.net>
22c937
Mime-Version: 1.0
22c937
Content-Type: text/plain; charset=UTF-8
22c937
Content-Transfer-Encoding: 8bit
22c937
------------
22c937
22c937
Patch 7.4.098
22c937
Problem:    When using ":'<,'>del" errors may be given for the visual line
22c937
            numbers being out of range.
22c937
Solution:   Reset Visual mode in ":del". (Lech Lorens)
22c937
Files:      src/ex_docmd.c, src/testdir/test103.in, src/testdir/test103.ok,
22c937
            src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
22c937
            src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
22c937
            src/testdir/Make_vms.mms, src/testdir/Makefile
22c937
22c937
22c937
*** ../vim-7.4.097/src/ex_docmd.c	2013-11-09 05:30:18.000000000 +0100
22c937
--- src/ex_docmd.c	2013-11-21 14:04:55.000000000 +0100
22c937
***************
22c937
*** 8570,8575 ****
22c937
--- 8570,8580 ----
22c937
  	beginline(BL_SOL | BL_FIX);
22c937
      }
22c937
  
22c937
+ #if defined(FEAT_VISUAL)
22c937
+     if (VIsual_active)
22c937
+ 	end_visual_mode();
22c937
+ #endif
22c937
+ 
22c937
      switch (eap->cmdidx)
22c937
      {
22c937
  	case CMD_delete:
22c937
*** ../vim-7.4.097/src/testdir/test103.in	2013-11-21 14:21:12.000000000 +0100
22c937
--- src/testdir/test103.in	2013-11-21 14:02:09.000000000 +0100
22c937
***************
22c937
*** 0 ****
22c937
--- 1,37 ----
22c937
+ Test for visual mode not being reset causing E315 error.
22c937
+ STARTTEST
22c937
+ :so small.vim
22c937
+ :enew
22c937
+ :let g:msg="Everything's fine."
22c937
+ :function! TriggerTheProblem()
22c937
+ :	" At this point there is no visual selection because :call reset it.
22c937
+ :	" Let's restore the selection:
22c937
+ :	normal gv
22c937
+ :	'<,'>del _
22c937
+ :	try
22c937
+ :		exe "normal \<Esc>"
22c937
+ :	catch /^Vim\%((\a\+)\)\=:E315/
22c937
+ :		echom 'Snap! E315 error!'
22c937
+ :		let g:msg='Snap! E315 error!'
22c937
+ :	endtry
22c937
+ :endfunction
22c937
+ :enew
22c937
+ :setl buftype=nofile
22c937
+ :call append(line('$'), 'Delete this line.')
22c937
+ :"
22c937
+ :"
22c937
+ :" NOTE: this has to be done by a call to a function because executing :del the
22c937
+ :"       ex-way will require the colon operator which resets the visual mode thus
22c937
+ :"       preventing the problem:
22c937
+ :"
22c937
+ GV:call TriggerTheProblem()
22c937
+ :%del _
22c937
+ :call append(line('$'), g:msg)
22c937
+ :w! test.out
22c937
+ :brewind
22c937
+ ENDTEST
22c937
+ 
22c937
+ STARTTEST
22c937
+ :qa!
22c937
+ ENDTEST
22c937
+ 
22c937
*** ../vim-7.4.097/src/testdir/test103.ok	2013-11-21 14:21:12.000000000 +0100
22c937
--- src/testdir/test103.ok	2013-11-21 14:02:28.000000000 +0100
22c937
***************
22c937
*** 0 ****
22c937
--- 1,2 ----
22c937
+ 
22c937
+ Everything's fine.
22c937
*** ../vim-7.4.097/src/testdir/Make_amiga.mak	2013-11-12 05:28:08.000000000 +0100
22c937
--- src/testdir/Make_amiga.mak	2013-11-21 14:02:51.000000000 +0100
22c937
***************
22c937
*** 34,40 ****
22c937
  		test81.out test82.out test83.out test84.out test88.out \
22c937
  		test89.out test90.out test91.out test92.out test93.out \
22c937
  		test94.out test95.out test96.out test97.out test98.out \
22c937
! 		test99.out test100.out test101.out test102.out
22c937
  
22c937
  .SUFFIXES: .in .out
22c937
  
22c937
--- 34,40 ----
22c937
  		test81.out test82.out test83.out test84.out test88.out \
22c937
  		test89.out test90.out test91.out test92.out test93.out \
22c937
  		test94.out test95.out test96.out test97.out test98.out \
22c937
! 		test99.out test100.out test101.out test102.out test103.out
22c937
  
22c937
  .SUFFIXES: .in .out
22c937
  
22c937
***************
22c937
*** 153,155 ****
22c937
--- 153,156 ----
22c937
  test100.out: test100.in
22c937
  test101.out: test101.in
22c937
  test102.out: test102.in
22c937
+ test103.out: test103.in
22c937
*** ../vim-7.4.097/src/testdir/Make_dos.mak	2013-11-12 05:28:08.000000000 +0100
22c937
--- src/testdir/Make_dos.mak	2013-11-21 14:02:58.000000000 +0100
22c937
***************
22c937
*** 33,39 ****
22c937
  		test84.out test85.out test86.out test87.out test88.out \
22c937
  		test89.out test90.out test91.out test92.out test93.out \
22c937
  		test94.out test95.out test96.out test98.out test99.out \
22c937
! 		test100.out test101.out test102.out
22c937
  
22c937
  SCRIPTS32 =	test50.out test70.out
22c937
  
22c937
--- 33,39 ----
22c937
  		test84.out test85.out test86.out test87.out test88.out \
22c937
  		test89.out test90.out test91.out test92.out test93.out \
22c937
  		test94.out test95.out test96.out test98.out test99.out \
22c937
! 		test100.out test101.out test102.out test103.out
22c937
  
22c937
  SCRIPTS32 =	test50.out test70.out
22c937
  
22c937
*** ../vim-7.4.097/src/testdir/Make_ming.mak	2013-11-12 05:28:08.000000000 +0100
22c937
--- src/testdir/Make_ming.mak	2013-11-21 14:03:01.000000000 +0100
22c937
***************
22c937
*** 53,59 ****
22c937
  		test84.out test85.out test86.out test87.out test88.out \
22c937
  		test89.out test90.out test91.out test92.out test93.out \
22c937
  		test94.out test95.out test96.out test98.out test99.out \
22c937
! 		test100out test101.out test102.out
22c937
  
22c937
  SCRIPTS32 =	test50.out test70.out
22c937
  
22c937
--- 53,59 ----
22c937
  		test84.out test85.out test86.out test87.out test88.out \
22c937
  		test89.out test90.out test91.out test92.out test93.out \
22c937
  		test94.out test95.out test96.out test98.out test99.out \
22c937
! 		test100out test101.out test102.out test103.out
22c937
  
22c937
  SCRIPTS32 =	test50.out test70.out
22c937
  
22c937
*** ../vim-7.4.097/src/testdir/Make_os2.mak	2013-11-12 05:28:08.000000000 +0100
22c937
--- src/testdir/Make_os2.mak	2013-11-21 14:03:03.000000000 +0100
22c937
***************
22c937
*** 35,41 ****
22c937
  		test81.out test82.out test83.out test84.out test88.out \
22c937
  		test89.out test90.out test91.out test92.out test93.out \
22c937
  		test94.out test95.out test96.out test98.out test99.out \
22c937
! 		test100.out test101.out test102.out
22c937
  
22c937
  .SUFFIXES: .in .out
22c937
  
22c937
--- 35,41 ----
22c937
  		test81.out test82.out test83.out test84.out test88.out \
22c937
  		test89.out test90.out test91.out test92.out test93.out \
22c937
  		test94.out test95.out test96.out test98.out test99.out \
22c937
! 		test100.out test101.out test102.out test103.out
22c937
  
22c937
  .SUFFIXES: .in .out
22c937
  
22c937
*** ../vim-7.4.097/src/testdir/Make_vms.mms	2013-11-12 05:28:08.000000000 +0100
22c937
--- src/testdir/Make_vms.mms	2013-11-21 14:03:13.000000000 +0100
22c937
***************
22c937
*** 4,10 ****
22c937
  # Authors:	Zoltan Arpadffy, <arpadffy@polarhome.com>
22c937
  #		Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
22c937
  #
22c937
! # Last change:  2013 Nov 12
22c937
  #
22c937
  # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
22c937
  # Edit the lines in the Configuration section below to select.
22c937
--- 4,10 ----
22c937
  # Authors:	Zoltan Arpadffy, <arpadffy@polarhome.com>
22c937
  #		Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
22c937
  #
22c937
! # Last change:  2013 Nov 21
22c937
  #
22c937
  # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
22c937
  # Edit the lines in the Configuration section below to select.
22c937
***************
22c937
*** 79,85 ****
22c937
  	 test82.out test83.out test84.out test88.out test89.out \
22c937
  	 test90.out test91.out test92.out test93.out test94.out \
22c937
  	 test95.out test96.out test97.out test98.out test99.out \
22c937
! 	 test100.out test101.out test102.out
22c937
  
22c937
  # Known problems:
22c937
  # Test 30: a problem around mac format - unknown reason
22c937
--- 79,85 ----
22c937
  	 test82.out test83.out test84.out test88.out test89.out \
22c937
  	 test90.out test91.out test92.out test93.out test94.out \
22c937
  	 test95.out test96.out test97.out test98.out test99.out \
22c937
! 	 test100.out test101.out test102.out test103.out
22c937
  
22c937
  # Known problems:
22c937
  # Test 30: a problem around mac format - unknown reason
22c937
*** ../vim-7.4.097/src/testdir/Makefile	2013-11-12 05:28:08.000000000 +0100
22c937
--- src/testdir/Makefile	2013-11-21 14:03:23.000000000 +0100
22c937
***************
22c937
*** 30,36 ****
22c937
  		test84.out test85.out test86.out test87.out test88.out \
22c937
  		test89.out test90.out test91.out test92.out test93.out \
22c937
  		test94.out test95.out test96.out test97.out test98.out \
22c937
! 		test99.out test100.out test101.out test102.out
22c937
  
22c937
  SCRIPTS_GUI = test16.out
22c937
  
22c937
--- 30,36 ----
22c937
  		test84.out test85.out test86.out test87.out test88.out \
22c937
  		test89.out test90.out test91.out test92.out test93.out \
22c937
  		test94.out test95.out test96.out test97.out test98.out \
22c937
! 		test99.out test100.out test101.out test102.out test103.out
22c937
  
22c937
  SCRIPTS_GUI = test16.out
22c937
  
22c937
*** ../vim-7.4.097/src/version.c	2013-11-21 13:24:36.000000000 +0100
22c937
--- src/version.c	2013-11-21 14:20:34.000000000 +0100
22c937
***************
22c937
*** 740,741 ****
22c937
--- 740,743 ----
22c937
  {   /* Add new patch number below this line */
22c937
+ /**/
22c937
+     98,
22c937
  /**/
22c937
22c937
-- 
22c937
I recommend ordering large cargo containers of paper towels to make up
22c937
whatever budget underruns you have.  Paper products are always useful and they
22c937
have the advantage of being completely flushable if you need to make room in
22c937
the storage area later.
22c937
				(Scott Adams - The Dilbert principle)
22c937
22c937
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
22c937
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
22c937
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
22c937
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///