Karsten Hopp 1e450b
To: vim_dev@googlegroups.com
Karsten Hopp 1e450b
Subject: Patch 7.3.887
Karsten Hopp 1e450b
Fcc: outbox
Karsten Hopp 1e450b
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 1e450b
Mime-Version: 1.0
Karsten Hopp 1e450b
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 1e450b
Content-Transfer-Encoding: 8bit
Karsten Hopp 1e450b
------------
Karsten Hopp 1e450b
Karsten Hopp 1e450b
Patch 7.3.887
Karsten Hopp 1e450b
Problem:    No tests for Visual mode operators, what 7.3.879 fixes.
Karsten Hopp 1e450b
Solution:   Add a new test file. (David Bürgin)
Karsten Hopp 1e450b
Files:	    src/testdir/test94.in, src/testdir/test94.ok,
Karsten Hopp 1e450b
	    src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
Karsten Hopp 1e450b
	    src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
Karsten Hopp 1e450b
	    src/testdir/Make_vms.mms, src/testdir/Makefile
Karsten Hopp 1e450b
Karsten Hopp 1e450b
Karsten Hopp 1e450b
*** ../vim-7.3.886/src/testdir/test94.in	2013-04-12 13:44:19.000000000 +0200
Karsten Hopp 1e450b
--- src/testdir/test94.in	2013-04-12 13:37:12.000000000 +0200
Karsten Hopp 1e450b
***************
Karsten Hopp 1e450b
*** 0 ****
Karsten Hopp 1e450b
--- 1,98 ----
Karsten Hopp 1e450b
+ Test for Visual mode and operators
Karsten Hopp 1e450b
+ 
Karsten Hopp 1e450b
+ Tests for the two kinds of operations: Those executed with Visual mode
Karsten Hopp 1e450b
+ followed by an operator and those executed via Operator-pending mode. Also
Karsten Hopp 1e450b
+ part of the test are mappings, counts, and repetition with the . command.
Karsten Hopp 1e450b
+ 
Karsten Hopp 1e450b
+ Test cases:
Karsten Hopp 1e450b
+ - Visual modes (v V CTRL-V) followed by an operator; count; repeating
Karsten Hopp 1e450b
+ - Visual mode maps; count; repeating
Karsten Hopp 1e450b
+   - Simple
Karsten Hopp 1e450b
+   - With an Ex command (custom text object)
Karsten Hopp 1e450b
+ - Operator-pending mode maps
Karsten Hopp 1e450b
+   - Simple
Karsten Hopp 1e450b
+   - With Ex command moving the cursor
Karsten Hopp 1e450b
+   - With Ex command and Visual selection (custom text object)
Karsten Hopp 1e450b
+ - Patch 7.3.879: Properly abort Ex command in Operator-pending mode
Karsten Hopp 1e450b
+ 
Karsten Hopp 1e450b
+ STARTTEST
Karsten Hopp 1e450b
+ :so small.vim
Karsten Hopp 1e450b
+ :set nocp
Karsten Hopp 1e450b
+ :
Karsten Hopp 1e450b
+ :" User functions
Karsten Hopp 1e450b
+ :function MoveToCap()
Karsten Hopp 1e450b
+ :  call search('\u', 'W')
Karsten Hopp 1e450b
+ :endfunction
Karsten Hopp 1e450b
+ :function SelectInCaps()
Karsten Hopp 1e450b
+ :  let [line1, col1] = searchpos('\u', 'bcnW')
Karsten Hopp 1e450b
+ :  let [line2, col2] = searchpos('.\u', 'nW')
Karsten Hopp 1e450b
+ :  call setpos("'<", [0, line1, col1, 0])
Karsten Hopp 1e450b
+ :  call setpos("'>", [0, line2, col2, 0])
Karsten Hopp 1e450b
+ :  normal! gv
Karsten Hopp 1e450b
+ :endfunction
Karsten Hopp 1e450b
+ :function MoveToEndCount(count)
Karsten Hopp 1e450b
+ :  normal! v:count . e
Karsten Hopp 1e450b
+ :endfunction
Karsten Hopp 1e450b
+ :
Karsten Hopp 1e450b
+ :" Visual modes followed by operator
Karsten Hopp 1e450b
+ /^apple
Karsten Hopp 1e450b
+ lvld.l3vd.:
Karsten Hopp 1e450b
+ /^line 1
Karsten Hopp 1e450b
+ Vcnewline?j.j2Vd.:
Karsten Hopp 1e450b
+ /^xxxx
Karsten Hopp 1e450b
+ ?jlc  ?l.l2?c----?l.:
Karsten Hopp 1e450b
+ :
Karsten Hopp 1e450b
+ :" Visual mode maps (movement and text object)
Karsten Hopp 1e450b
+ :vnoremap W /\u/s-1<CR>
Karsten Hopp 1e450b
+ :vnoremap iW :<C-U>call SelectInCaps()<CR>
Karsten Hopp 1e450b
+ /^Kiwi
Karsten Hopp 1e450b
+ vWcNo?l.fD2vd.:
Karsten Hopp 1e450b
+ /^Jambu
Karsten Hopp 1e450b
+ llviWc-?l.l2vdl.:
Karsten Hopp 1e450b
+ :
Karsten Hopp 1e450b
+ :" Operator-pending mode maps (movement and text object)
Karsten Hopp 1e450b
+ :onoremap W /\u/<CR>
Karsten Hopp 1e450b
+ :onoremap <Leader>W :<C-U>call MoveToCap()<CR>
Karsten Hopp 1e450b
+ :onoremap iW :<C-U>call SelectInCaps()<CR>
Karsten Hopp 1e450b
+ /^Pineapple
Karsten Hopp 1e450b
+ cW-?l.l2.l.:
Karsten Hopp 1e450b
+ /^Juniper
Karsten Hopp 1e450b
+ g?\WfD.:
Karsten Hopp 1e450b
+ /^Lemon
Karsten Hopp 1e450b
+ yiWPlciWNew?:
Karsten Hopp 1e450b
+ :
Karsten Hopp 1e450b
+ :" Patch 7.3.879: Properly abort Operator-pending mode for "dv:<Esc>" etc.
Karsten Hopp 1e450b
+ /^zzzz
Karsten Hopp 1e450b
+ dV:
dv:
:set noma | let v:errmsg = ''
Karsten Hopp 1e450b
+ d:
:set ma | put = v:errmsg =~# '^E21' ? 'ok' : 'failed'
Karsten Hopp 1e450b
+ dv:?dV:?:set noma | let v:errmsg = ''
Karsten Hopp 1e450b
+ d:?:set ma | put = v:errmsg =~# '^E21' ? 'failed' : 'ok'
Karsten Hopp 1e450b
+ :/^start:/+2,$w! test.out
Karsten Hopp 1e450b
+ :q!
Karsten Hopp 1e450b
+ ENDTEST
Karsten Hopp 1e450b
+ 
Karsten Hopp 1e450b
+ start:
Karsten Hopp 1e450b
+ 
Karsten Hopp 1e450b
+ apple banana cherry
Karsten Hopp 1e450b
+ 
Karsten Hopp 1e450b
+ line 1 line 1
Karsten Hopp 1e450b
+ line 2 line 2
Karsten Hopp 1e450b
+ line 3 line 3
Karsten Hopp 1e450b
+ line 4 line 4
Karsten Hopp 1e450b
+ line 5 line 5
Karsten Hopp 1e450b
+ line 6 line 6
Karsten Hopp 1e450b
+ 
Karsten Hopp 1e450b
+ xxxxxxxxxxxxx
Karsten Hopp 1e450b
+ xxxxxxxxxxxxx
Karsten Hopp 1e450b
+ xxxxxxxxxxxxx
Karsten Hopp 1e450b
+ xxxxxxxxxxxxx
Karsten Hopp 1e450b
+ 
Karsten Hopp 1e450b
+ KiwiRaspberryDateWatermelonPeach
Karsten Hopp 1e450b
+ JambuRambutanBananaTangerineMango
Karsten Hopp 1e450b
+ 
Karsten Hopp 1e450b
+ PineappleQuinceLoganberryOrangeGrapefruitKiwiZ
Karsten Hopp 1e450b
+ JuniperDurianZ
Karsten Hopp 1e450b
+ LemonNectarineZ
Karsten Hopp 1e450b
+ 
Karsten Hopp 1e450b
+ zzzz
Karsten Hopp 1e450b
+ zzzz
Karsten Hopp 1e450b
*** ../vim-7.3.886/src/testdir/test94.ok	2013-04-12 13:44:19.000000000 +0200
Karsten Hopp 1e450b
--- src/testdir/test94.ok	2013-04-12 13:37:12.000000000 +0200
Karsten Hopp 1e450b
***************
Karsten Hopp 1e450b
*** 0 ****
Karsten Hopp 1e450b
--- 1,20 ----
Karsten Hopp 1e450b
+ a y
Karsten Hopp 1e450b
+ 
Karsten Hopp 1e450b
+ newline
Karsten Hopp 1e450b
+ newline
Karsten Hopp 1e450b
+ 
Karsten Hopp 1e450b
+     --------x
Karsten Hopp 1e450b
+     --------x
Karsten Hopp 1e450b
+ xxxx--------x
Karsten Hopp 1e450b
+ xxxx--------x
Karsten Hopp 1e450b
+ 
Karsten Hopp 1e450b
+ NoNoberryach
Karsten Hopp 1e450b
+ --ago
Karsten Hopp 1e450b
+ 
Karsten Hopp 1e450b
+ ----Z
Karsten Hopp 1e450b
+ WhavcreQhevnaZ
Karsten Hopp 1e450b
+ LemonNewNectarineZ
Karsten Hopp 1e450b
+ 
Karsten Hopp 1e450b
+ zzz
Karsten Hopp 1e450b
+ ok
Karsten Hopp 1e450b
+ ok
Karsten Hopp 1e450b
*** ../vim-7.3.886/src/testdir/Make_amiga.mak	2013-02-26 17:21:15.000000000 +0100
Karsten Hopp 1e450b
--- src/testdir/Make_amiga.mak	2013-04-12 13:39:47.000000000 +0200
Karsten Hopp 1e450b
***************
Karsten Hopp 1e450b
*** 32,38 ****
Karsten Hopp 1e450b
  		test71.out test72.out test73.out test74.out test75.out \
Karsten Hopp 1e450b
  		test76.out test77.out test78.out test79.out test80.out \
Karsten Hopp 1e450b
  		test81.out test82.out test83.out test84.out test88.out \
Karsten Hopp 1e450b
! 		test89.out test90.out test91.out test92.out test93.out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
  .SUFFIXES: .in .out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
--- 32,39 ----
Karsten Hopp 1e450b
  		test71.out test72.out test73.out test74.out test75.out \
Karsten Hopp 1e450b
  		test76.out test77.out test78.out test79.out test80.out \
Karsten Hopp 1e450b
  		test81.out test82.out test83.out test84.out test88.out \
Karsten Hopp 1e450b
! 		test89.out test90.out test91.out test92.out test93.out \
Karsten Hopp 1e450b
! 		test94.out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
  .SUFFIXES: .in .out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
***************
Karsten Hopp 1e450b
*** 142,144 ****
Karsten Hopp 1e450b
--- 143,146 ----
Karsten Hopp 1e450b
  test91.out: test91.in
Karsten Hopp 1e450b
  test92.out: test92.in
Karsten Hopp 1e450b
  test93.out: test93.in
Karsten Hopp 1e450b
+ test94.out: test94.in
Karsten Hopp 1e450b
*** ../vim-7.3.886/src/testdir/Make_dos.mak	2013-02-26 17:21:15.000000000 +0100
Karsten Hopp 1e450b
--- src/testdir/Make_dos.mak	2013-04-12 13:39:56.000000000 +0200
Karsten Hopp 1e450b
***************
Karsten Hopp 1e450b
*** 31,37 ****
Karsten Hopp 1e450b
  		test74.out test75.out test76.out test77.out test78.out \
Karsten Hopp 1e450b
  		test79.out test80.out test81.out test82.out test83.out \
Karsten Hopp 1e450b
  		test84.out test85.out test86.out test87.out test88.out \
Karsten Hopp 1e450b
! 		test89.out test90.out test91.out test92.out test93.out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
  SCRIPTS32 =	test50.out test70.out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
--- 31,38 ----
Karsten Hopp 1e450b
  		test74.out test75.out test76.out test77.out test78.out \
Karsten Hopp 1e450b
  		test79.out test80.out test81.out test82.out test83.out \
Karsten Hopp 1e450b
  		test84.out test85.out test86.out test87.out test88.out \
Karsten Hopp 1e450b
! 		test89.out test90.out test91.out test92.out test93.out \
Karsten Hopp 1e450b
! 		test94.out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
  SCRIPTS32 =	test50.out test70.out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
*** ../vim-7.3.886/src/testdir/Make_ming.mak	2013-02-26 17:21:15.000000000 +0100
Karsten Hopp 1e450b
--- src/testdir/Make_ming.mak	2013-04-12 13:40:06.000000000 +0200
Karsten Hopp 1e450b
***************
Karsten Hopp 1e450b
*** 51,57 ****
Karsten Hopp 1e450b
  		test74.out test75.out test76.out test77.out test78.out \
Karsten Hopp 1e450b
  		test79.out test80.out test81.out test82.out test83.out \
Karsten Hopp 1e450b
  		test84.out test85.out test86.out test87.out test88.out \
Karsten Hopp 1e450b
! 		test89.out test90.out test91.out test92.out test93.out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
  SCRIPTS32 =	test50.out test70.out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
--- 51,58 ----
Karsten Hopp 1e450b
  		test74.out test75.out test76.out test77.out test78.out \
Karsten Hopp 1e450b
  		test79.out test80.out test81.out test82.out test83.out \
Karsten Hopp 1e450b
  		test84.out test85.out test86.out test87.out test88.out \
Karsten Hopp 1e450b
! 		test89.out test90.out test91.out test92.out test93.out \
Karsten Hopp 1e450b
! 		test94.out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
  SCRIPTS32 =	test50.out test70.out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
*** ../vim-7.3.886/src/testdir/Make_os2.mak	2013-02-26 17:21:15.000000000 +0100
Karsten Hopp 1e450b
--- src/testdir/Make_os2.mak	2013-04-12 13:40:13.000000000 +0200
Karsten Hopp 1e450b
***************
Karsten Hopp 1e450b
*** 32,38 ****
Karsten Hopp 1e450b
  		test71.out test72.out test73.out test74.out test75.out \
Karsten Hopp 1e450b
  		test76.out test77.out test78.out test79.out test80.out \
Karsten Hopp 1e450b
  		test81.out test82.out test83.out test84.out test88.out \
Karsten Hopp 1e450b
! 		test89.out test90.out test91.out test92.out test93.out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
  .SUFFIXES: .in .out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
--- 32,39 ----
Karsten Hopp 1e450b
  		test71.out test72.out test73.out test74.out test75.out \
Karsten Hopp 1e450b
  		test76.out test77.out test78.out test79.out test80.out \
Karsten Hopp 1e450b
  		test81.out test82.out test83.out test84.out test88.out \
Karsten Hopp 1e450b
! 		test89.out test90.out test91.out test92.out test93.out \
Karsten Hopp 1e450b
! 		test94.out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
  .SUFFIXES: .in .out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
*** ../vim-7.3.886/src/testdir/Make_vms.mms	2013-02-26 17:21:15.000000000 +0100
Karsten Hopp 1e450b
--- src/testdir/Make_vms.mms	2013-04-12 13:40:24.000000000 +0200
Karsten Hopp 1e450b
***************
Karsten Hopp 1e450b
*** 4,10 ****
Karsten Hopp 1e450b
  # Authors:	Zoltan Arpadffy, <arpadffy@polarhome.com>
Karsten Hopp 1e450b
  #		Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
Karsten Hopp 1e450b
  #
Karsten Hopp 1e450b
! # Last change:  2013-02-21
Karsten Hopp 1e450b
  #
Karsten Hopp 1e450b
  # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
Karsten Hopp 1e450b
  # Edit the lines in the Configuration section below to select.
Karsten Hopp 1e450b
--- 4,10 ----
Karsten Hopp 1e450b
  # Authors:	Zoltan Arpadffy, <arpadffy@polarhome.com>
Karsten Hopp 1e450b
  #		Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
Karsten Hopp 1e450b
  #
Karsten Hopp 1e450b
! # Last change:  2013 Apr 12
Karsten Hopp 1e450b
  #
Karsten Hopp 1e450b
  # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
Karsten Hopp 1e450b
  # Edit the lines in the Configuration section below to select.
Karsten Hopp 1e450b
***************
Karsten Hopp 1e450b
*** 77,83 ****
Karsten Hopp 1e450b
  	 test71.out test72.out test74.out test75.out test76.out \
Karsten Hopp 1e450b
  	 test77.out test78.out test79.out test80.out test81.out \
Karsten Hopp 1e450b
  	 test82.out test83.out test84.out test88.out test89.out \
Karsten Hopp 1e450b
! 	 test90.out test91.out test92.out test93.out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
  # Known problems:
Karsten Hopp 1e450b
  # Test 30: a problem around mac format - unknown reason
Karsten Hopp 1e450b
--- 77,83 ----
Karsten Hopp 1e450b
  	 test71.out test72.out test74.out test75.out test76.out \
Karsten Hopp 1e450b
  	 test77.out test78.out test79.out test80.out test81.out \
Karsten Hopp 1e450b
  	 test82.out test83.out test84.out test88.out test89.out \
Karsten Hopp 1e450b
! 	 test90.out test91.out test92.out test93.out test94.out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
  # Known problems:
Karsten Hopp 1e450b
  # Test 30: a problem around mac format - unknown reason
Karsten Hopp 1e450b
*** ../vim-7.3.886/src/testdir/Makefile	2013-02-26 17:21:15.000000000 +0100
Karsten Hopp 1e450b
--- src/testdir/Makefile	2013-04-12 13:40:32.000000000 +0200
Karsten Hopp 1e450b
***************
Karsten Hopp 1e450b
*** 28,34 ****
Karsten Hopp 1e450b
  		test74.out test75.out test76.out test77.out test78.out \
Karsten Hopp 1e450b
  		test79.out test80.out test81.out test82.out test83.out \
Karsten Hopp 1e450b
  		test84.out test85.out test86.out test87.out test88.out \
Karsten Hopp 1e450b
! 		test89.out test90.out test91.out test92.out test93.out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
  SCRIPTS_GUI = test16.out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
--- 28,35 ----
Karsten Hopp 1e450b
  		test74.out test75.out test76.out test77.out test78.out \
Karsten Hopp 1e450b
  		test79.out test80.out test81.out test82.out test83.out \
Karsten Hopp 1e450b
  		test84.out test85.out test86.out test87.out test88.out \
Karsten Hopp 1e450b
! 		test89.out test90.out test91.out test92.out test93.out \
Karsten Hopp 1e450b
! 		test94.out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
  SCRIPTS_GUI = test16.out
Karsten Hopp 1e450b
  
Karsten Hopp 1e450b
*** ../vim-7.3.886/src/version.c	2013-04-12 12:27:24.000000000 +0200
Karsten Hopp 1e450b
--- src/version.c	2013-04-12 13:43:34.000000000 +0200
Karsten Hopp 1e450b
***************
Karsten Hopp 1e450b
*** 730,731 ****
Karsten Hopp 1e450b
--- 730,733 ----
Karsten Hopp 1e450b
  {   /* Add new patch number below this line */
Karsten Hopp 1e450b
+ /**/
Karsten Hopp 1e450b
+     887,
Karsten Hopp 1e450b
  /**/
Karsten Hopp 1e450b
Karsten Hopp 1e450b
-- 
Karsten Hopp 1e450b
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 1e450b
153. You find yourself staring at your "inbox" waiting for new e-mail
Karsten Hopp 1e450b
     to arrive.
Karsten Hopp 1e450b
Karsten Hopp 1e450b
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 1e450b
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 1e450b
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 1e450b
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///