Karsten Hopp 764110
To: vim-dev@vim.org
Karsten Hopp 764110
Subject: Patch 7.2.335
Karsten Hopp 764110
Fcc: outbox
Karsten Hopp 764110
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 764110
Mime-Version: 1.0
Karsten Hopp 764110
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 764110
Content-Transfer-Encoding: 8bit
Karsten Hopp 764110
------------
Karsten Hopp 764110
Karsten Hopp 764110
Patch 7.2.335
Karsten Hopp 764110
Problem:    The CTRL-] command escapes too many characters.
Karsten Hopp 764110
Solution:   Use a different list of characters to be escaped. (Sergey Khorev)
Karsten Hopp 764110
Files:	    src/normal.c
Karsten Hopp 764110
Karsten Hopp 764110
Karsten Hopp 764110
*** ../vim-7.2.334/src/normal.c	2010-01-12 15:42:03.000000000 +0100
Karsten Hopp 764110
--- src/normal.c	2010-01-19 15:20:11.000000000 +0100
Karsten Hopp 764110
***************
Karsten Hopp 764110
*** 5406,5411 ****
Karsten Hopp 764110
--- 5406,5412 ----
Karsten Hopp 764110
      int		n = 0;		/* init for GCC */
Karsten Hopp 764110
      int		cmdchar;
Karsten Hopp 764110
      int		g_cmd;		/* "g" command */
Karsten Hopp 764110
+     int		tag_cmd = FALSE;
Karsten Hopp 764110
      char_u	*aux_ptr;
Karsten Hopp 764110
      int		isman;
Karsten Hopp 764110
      int		isman_s;
Karsten Hopp 764110
***************
Karsten Hopp 764110
*** 5515,5520 ****
Karsten Hopp 764110
--- 5516,5522 ----
Karsten Hopp 764110
  	    break;
Karsten Hopp 764110
  
Karsten Hopp 764110
  	case ']':
Karsten Hopp 764110
+ 	    tag_cmd = TRUE;
Karsten Hopp 764110
  #ifdef FEAT_CSCOPE
Karsten Hopp 764110
  	    if (p_cst)
Karsten Hopp 764110
  		STRCPY(buf, "cstag ");
Karsten Hopp 764110
***************
Karsten Hopp 764110
*** 5526,5535 ****
Karsten Hopp 764110
  	default:
Karsten Hopp 764110
  	    if (curbuf->b_help)
Karsten Hopp 764110
  		STRCPY(buf, "he! ");
Karsten Hopp 764110
- 	    else if (g_cmd)
Karsten Hopp 764110
- 		STRCPY(buf, "tj ");
Karsten Hopp 764110
  	    else
Karsten Hopp 764110
! 		sprintf((char *)buf, "%ldta ", cap->count0);
Karsten Hopp 764110
      }
Karsten Hopp 764110
  
Karsten Hopp 764110
      /*
Karsten Hopp 764110
--- 5528,5541 ----
Karsten Hopp 764110
  	default:
Karsten Hopp 764110
  	    if (curbuf->b_help)
Karsten Hopp 764110
  		STRCPY(buf, "he! ");
Karsten Hopp 764110
  	    else
Karsten Hopp 764110
! 	    {
Karsten Hopp 764110
! 		tag_cmd = TRUE;
Karsten Hopp 764110
! 		if (g_cmd)
Karsten Hopp 764110
! 		    STRCPY(buf, "tj ");
Karsten Hopp 764110
! 		else
Karsten Hopp 764110
! 		    sprintf((char *)buf, "%ldta ", cap->count0);
Karsten Hopp 764110
! 	    }
Karsten Hopp 764110
      }
Karsten Hopp 764110
  
Karsten Hopp 764110
      /*
Karsten Hopp 764110
***************
Karsten Hopp 764110
*** 5562,5569 ****
Karsten Hopp 764110
  	    aux_ptr = (char_u *)(p_magic ? "/.*~[^$\\" : "/^$\\");
Karsten Hopp 764110
  	else if (cmdchar == '#')
Karsten Hopp 764110
  	    aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\");
Karsten Hopp 764110
! 	else
Karsten Hopp 764110
  	    /* Don't escape spaces and Tabs in a tag with a backslash */
Karsten Hopp 764110
  	    aux_ptr = (char_u *)"\\|\"\n*?[";
Karsten Hopp 764110
  
Karsten Hopp 764110
  	p = buf + STRLEN(buf);
Karsten Hopp 764110
--- 5568,5577 ----
Karsten Hopp 764110
  	    aux_ptr = (char_u *)(p_magic ? "/.*~[^$\\" : "/^$\\");
Karsten Hopp 764110
  	else if (cmdchar == '#')
Karsten Hopp 764110
  	    aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\");
Karsten Hopp 764110
! 	else if (tag_cmd)
Karsten Hopp 764110
  	    /* Don't escape spaces and Tabs in a tag with a backslash */
Karsten Hopp 764110
+ 	    aux_ptr = (char_u *)"\\|\"\n[";
Karsten Hopp 764110
+ 	else
Karsten Hopp 764110
  	    aux_ptr = (char_u *)"\\|\"\n*?[";
Karsten Hopp 764110
  
Karsten Hopp 764110
  	p = buf + STRLEN(buf);
Karsten Hopp 764110
*** ../vim-7.2.334/src/version.c	2010-01-19 15:12:33.000000000 +0100
Karsten Hopp 764110
--- src/version.c	2010-01-19 15:22:44.000000000 +0100
Karsten Hopp 764110
***************
Karsten Hopp 764110
*** 683,684 ****
Karsten Hopp 764110
--- 683,686 ----
Karsten Hopp 764110
  {   /* Add new patch number below this line */
Karsten Hopp 764110
+ /**/
Karsten Hopp 764110
+     335,
Karsten Hopp 764110
  /**/
Karsten Hopp 764110
Karsten Hopp 764110
-- 
Karsten Hopp 764110
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 764110
120. You ask a friend, "What's that big shiny thing?" He says, "It's the sun."
Karsten Hopp 764110
Karsten Hopp 764110
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 764110
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 764110
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 764110
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///