Karsten Hopp a41e5f
To: vim_dev@googlegroups.com
Karsten Hopp a41e5f
Subject: Patch 7.3.481
Karsten Hopp a41e5f
Fcc: outbox
Karsten Hopp a41e5f
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp a41e5f
Mime-Version: 1.0
Karsten Hopp a41e5f
Content-Type: text/plain; charset=UTF-8
Karsten Hopp a41e5f
Content-Transfer-Encoding: 8bit
Karsten Hopp a41e5f
------------
Karsten Hopp a41e5f
Karsten Hopp a41e5f
Patch 7.3.481
Karsten Hopp a41e5f
Problem:    Changing 'virtualedit' in an operator function to "all" does not
Karsten Hopp a41e5f
	    have the desired effect. (Aaron Bohannon)
Karsten Hopp a41e5f
Solution:   Save, reset and restore virtual_op when executing an operator
Karsten Hopp a41e5f
	    function.
Karsten Hopp a41e5f
Files:	    src/normal.c
Karsten Hopp a41e5f
Karsten Hopp a41e5f
Karsten Hopp a41e5f
*** ../vim-7.3.480/src/normal.c	2012-02-05 01:18:41.000000000 +0100
Karsten Hopp a41e5f
--- src/normal.c	2012-03-28 12:59:46.000000000 +0200
Karsten Hopp a41e5f
***************
Karsten Hopp a41e5f
*** 2279,2284 ****
Karsten Hopp a41e5f
--- 2279,2285 ----
Karsten Hopp a41e5f
  {
Karsten Hopp a41e5f
  #ifdef FEAT_EVAL
Karsten Hopp a41e5f
      char_u	*(argv[1]);
Karsten Hopp a41e5f
+     int		save_virtual_op = virtual_op;
Karsten Hopp a41e5f
  
Karsten Hopp a41e5f
      if (*p_opfunc == NUL)
Karsten Hopp a41e5f
  	EMSG(_("E774: 'operatorfunc' is empty"));
Karsten Hopp a41e5f
***************
Karsten Hopp a41e5f
*** 2297,2303 ****
Karsten Hopp a41e5f
--- 2298,2311 ----
Karsten Hopp a41e5f
  	    argv[0] = (char_u *)"line";
Karsten Hopp a41e5f
  	else
Karsten Hopp a41e5f
  	    argv[0] = (char_u *)"char";
Karsten Hopp a41e5f
+ 
Karsten Hopp a41e5f
+ 	/* Reset virtual_op so that 'virtualedit' can be changed in the
Karsten Hopp a41e5f
+ 	 * function. */
Karsten Hopp a41e5f
+ 	virtual_op = MAYBE;
Karsten Hopp a41e5f
+ 
Karsten Hopp a41e5f
  	(void)call_func_retnr(p_opfunc, 1, argv, FALSE);
Karsten Hopp a41e5f
+ 
Karsten Hopp a41e5f
+ 	virtual_op = save_virtual_op;
Karsten Hopp a41e5f
      }
Karsten Hopp a41e5f
  #else
Karsten Hopp a41e5f
      EMSG(_("E775: Eval feature not available"));
Karsten Hopp a41e5f
*** ../vim-7.3.480/src/version.c	2012-03-23 18:39:10.000000000 +0100
Karsten Hopp a41e5f
--- src/version.c	2012-03-28 12:50:20.000000000 +0200
Karsten Hopp a41e5f
***************
Karsten Hopp a41e5f
*** 716,717 ****
Karsten Hopp a41e5f
--- 716,719 ----
Karsten Hopp a41e5f
  {   /* Add new patch number below this line */
Karsten Hopp a41e5f
+ /**/
Karsten Hopp a41e5f
+     481,
Karsten Hopp a41e5f
  /**/
Karsten Hopp a41e5f
Karsten Hopp a41e5f
-- 
Karsten Hopp a41e5f
hundred-and-one symptoms of being an internet addict:
Karsten Hopp a41e5f
269. You wonder how you can make your dustbin produce Sesame Street's
Karsten Hopp a41e5f
     Oscar's the Garbage Monster song when you empty it.
Karsten Hopp a41e5f
Karsten Hopp a41e5f
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp a41e5f
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp a41e5f
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp a41e5f
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///