Karsten Hopp 333f90
To: vim_dev@googlegroups.com
Karsten Hopp 333f90
Subject: Patch 7.4.895
Karsten Hopp 333f90
Fcc: outbox
Karsten Hopp 333f90
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 333f90
Mime-Version: 1.0
Karsten Hopp 333f90
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 333f90
Content-Transfer-Encoding: 8bit
Karsten Hopp 333f90
------------
Karsten Hopp 333f90
Karsten Hopp 333f90
Patch 7.4.895
Karsten Hopp 333f90
Problem:    Custom command line completion does not work for a command
Karsten Hopp 333f90
            containing digits.
Karsten Hopp 333f90
Solution:   Skip over the digits. (suggested by Yasuhiro Matsumoto)
Karsten Hopp 333f90
Files:      src/ex_docmd.c
Karsten Hopp 333f90
Karsten Hopp 333f90
Karsten Hopp 333f90
*** ../vim-7.4.894/src/ex_docmd.c	2015-09-25 16:59:43.001963805 +0200
Karsten Hopp 333f90
--- src/ex_docmd.c	2015-10-13 19:15:10.518151666 +0200
Karsten Hopp 333f90
***************
Karsten Hopp 333f90
*** 3517,3525 ****
Karsten Hopp 333f90
  	p = cmd;
Karsten Hopp 333f90
  	while (ASCII_ISALPHA(*p) || *p == '*')    /* Allow * wild card */
Karsten Hopp 333f90
  	    ++p;
Karsten Hopp 333f90
! 	/* check for non-alpha command */
Karsten Hopp 333f90
! 	if (p == cmd && vim_strchr((char_u *)"@*!=><&~#", *p) != NULL)
Karsten Hopp 333f90
! 	    ++p;
Karsten Hopp 333f90
  	/* for python 3.x: ":py3*" commands completion */
Karsten Hopp 333f90
  	if (cmd[0] == 'p' && cmd[1] == 'y' && p == cmd + 2 && *p == '3')
Karsten Hopp 333f90
  	{
Karsten Hopp 333f90
--- 3517,3526 ----
Karsten Hopp 333f90
  	p = cmd;
Karsten Hopp 333f90
  	while (ASCII_ISALPHA(*p) || *p == '*')    /* Allow * wild card */
Karsten Hopp 333f90
  	    ++p;
Karsten Hopp 333f90
! 	/* a user command may contain digits */
Karsten Hopp 333f90
! 	if (ASCII_ISUPPER(cmd[0]))
Karsten Hopp 333f90
! 	    while (ASCII_ISALNUM(*p) || *p == '*')
Karsten Hopp 333f90
! 		++p;
Karsten Hopp 333f90
  	/* for python 3.x: ":py3*" commands completion */
Karsten Hopp 333f90
  	if (cmd[0] == 'p' && cmd[1] == 'y' && p == cmd + 2 && *p == '3')
Karsten Hopp 333f90
  	{
Karsten Hopp 333f90
***************
Karsten Hopp 333f90
*** 3527,3532 ****
Karsten Hopp 333f90
--- 3528,3536 ----
Karsten Hopp 333f90
  	    while (ASCII_ISALPHA(*p) || *p == '*')
Karsten Hopp 333f90
  		++p;
Karsten Hopp 333f90
  	}
Karsten Hopp 333f90
+ 	/* check for non-alpha command */
Karsten Hopp 333f90
+ 	if (p == cmd && vim_strchr((char_u *)"@*!=><&~#", *p) != NULL)
Karsten Hopp 333f90
+ 	    ++p;
Karsten Hopp 333f90
  	len = (int)(p - cmd);
Karsten Hopp 333f90
  
Karsten Hopp 333f90
  	if (len == 0)
Karsten Hopp 333f90
*** ../vim-7.4.894/src/version.c	2015-10-13 17:52:55.921988351 +0200
Karsten Hopp 333f90
--- src/version.c	2015-10-13 19:09:26.773766612 +0200
Karsten Hopp 333f90
***************
Karsten Hopp 333f90
*** 743,744 ****
Karsten Hopp 333f90
--- 743,746 ----
Karsten Hopp 333f90
  {   /* Add new patch number below this line */
Karsten Hopp 333f90
+ /**/
Karsten Hopp 333f90
+     895,
Karsten Hopp 333f90
  /**/
Karsten Hopp 333f90
Karsten Hopp 333f90
-- 
Karsten Hopp 333f90
To define recursion, we must first define recursion.
Karsten Hopp 333f90
Karsten Hopp 333f90
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 333f90
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 333f90
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 333f90
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///