Karsten Hopp 33c9b8
To: vim-dev@vim.org
Karsten Hopp 33c9b8
Subject: Patch 7.1.140
Karsten Hopp 33c9b8
Fcc: outbox
Karsten Hopp 33c9b8
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 33c9b8
Mime-Version: 1.0
Karsten Hopp 33c9b8
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 33c9b8
Content-Transfer-Encoding: 8bit
Karsten Hopp 33c9b8
------------
Karsten Hopp 33c9b8
Karsten Hopp 33c9b8
Patch 7.1.140
Karsten Hopp 33c9b8
Problem:    v:count is set only after typing a non-digit, that makes it
Karsten Hopp 33c9b8
	    difficult to make a nice mapping.
Karsten Hopp 33c9b8
Solution:   Set v:count while still typing the count.
Karsten Hopp 33c9b8
Files:	    src/normal.c
Karsten Hopp 33c9b8
Karsten Hopp 33c9b8
Karsten Hopp 33c9b8
*** ../vim-7.1.139/src/normal.c	Thu Sep 13 18:25:08 2007
Karsten Hopp 33c9b8
--- src/normal.c	Sun Oct 14 17:15:36 2007
Karsten Hopp 33c9b8
***************
Karsten Hopp 33c9b8
*** 690,695 ****
Karsten Hopp 33c9b8
--- 690,702 ----
Karsten Hopp 33c9b8
  		ca.count0 = ca.count0 * 10 + (c - '0');
Karsten Hopp 33c9b8
  	    if (ca.count0 < 0)	    /* got too large! */
Karsten Hopp 33c9b8
  		ca.count0 = 999999999L;
Karsten Hopp 33c9b8
+ #ifdef FEAT_EVAL
Karsten Hopp 33c9b8
+ 	    /* Set v:count here, when called from main() and not a stuffed
Karsten Hopp 33c9b8
+ 	     * command, so that v:count can be used in an expression mapping
Karsten Hopp 33c9b8
+ 	     * right after the count. */
Karsten Hopp 33c9b8
+ 	    if (toplevel && stuff_empty())
Karsten Hopp 33c9b8
+ 		set_vcount(ca.count0, ca.count0 == 0 ? 1 : ca.count0);
Karsten Hopp 33c9b8
+ #endif
Karsten Hopp 33c9b8
  	    if (ctrl_w)
Karsten Hopp 33c9b8
  	    {
Karsten Hopp 33c9b8
  		++no_mapping;
Karsten Hopp 33c9b8
*** ../vim-7.1.139/src/version.c	Sun Oct 14 15:32:10 2007
Karsten Hopp 33c9b8
--- src/version.c	Sun Oct 14 17:13:15 2007
Karsten Hopp 33c9b8
***************
Karsten Hopp 33c9b8
*** 668,669 ****
Karsten Hopp 33c9b8
--- 668,671 ----
Karsten Hopp 33c9b8
  {   /* Add new patch number below this line */
Karsten Hopp 33c9b8
+ /**/
Karsten Hopp 33c9b8
+     140,
Karsten Hopp 33c9b8
  /**/
Karsten Hopp 33c9b8
Karsten Hopp 33c9b8
-- 
Karsten Hopp 33c9b8
How To Keep A Healthy Level Of Insanity:
Karsten Hopp 33c9b8
11. Specify that your drive-through order is "to go".
Karsten Hopp 33c9b8
Karsten Hopp 33c9b8
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 33c9b8
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 33c9b8
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 33c9b8
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///