Karsten Hopp d59b1c
To: vim_dev@googlegroups.com
Karsten Hopp d59b1c
Subject: Patch 7.3.504
Karsten Hopp d59b1c
Fcc: outbox
Karsten Hopp d59b1c
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp d59b1c
Mime-Version: 1.0
Karsten Hopp d59b1c
Content-Type: text/plain; charset=UTF-8
Karsten Hopp d59b1c
Content-Transfer-Encoding: 8bit
Karsten Hopp d59b1c
------------
Karsten Hopp d59b1c
Karsten Hopp d59b1c
Patch 7.3.504
Karsten Hopp d59b1c
Problem:    Commands in help files are not highlighted.
Karsten Hopp d59b1c
Solution:   Allow for commands in backticks.  Adjust CTRL-] to remove the
Karsten Hopp d59b1c
	    backticks.
Karsten Hopp d59b1c
Files:	    src/ex_cmds.c
Karsten Hopp d59b1c
Karsten Hopp d59b1c
Karsten Hopp d59b1c
*** ../vim-7.3.503/src/ex_cmds.c	2012-04-05 16:04:58.000000000 +0200
Karsten Hopp d59b1c
--- src/ex_cmds.c	2012-04-25 12:51:41.000000000 +0200
Karsten Hopp d59b1c
***************
Karsten Hopp d59b1c
*** 3421,3427 ****
Karsten Hopp d59b1c
  		     * and re-attach to buffer, perhaps.
Karsten Hopp d59b1c
  		     */
Karsten Hopp d59b1c
  		    if (curwin->w_s == &(curwin->w_buffer->b_s))
Karsten Hopp d59b1c
! 			    curwin->w_s = &(buf->b_s);
Karsten Hopp d59b1c
  #endif
Karsten Hopp d59b1c
  		    curwin->w_buffer = buf;
Karsten Hopp d59b1c
  		    curbuf = buf;
Karsten Hopp d59b1c
--- 3421,3427 ----
Karsten Hopp d59b1c
  		     * and re-attach to buffer, perhaps.
Karsten Hopp d59b1c
  		     */
Karsten Hopp d59b1c
  		    if (curwin->w_s == &(curwin->w_buffer->b_s))
Karsten Hopp d59b1c
! 			curwin->w_s = &(buf->b_s);
Karsten Hopp d59b1c
  #endif
Karsten Hopp d59b1c
  		    curwin->w_buffer = buf;
Karsten Hopp d59b1c
  		    curbuf = buf;
Karsten Hopp d59b1c
***************
Karsten Hopp d59b1c
*** 5965,5970 ****
Karsten Hopp d59b1c
--- 5965,5993 ----
Karsten Hopp d59b1c
  		break;
Karsten Hopp d59b1c
  	  }
Karsten Hopp d59b1c
  	  *d = NUL;
Karsten Hopp d59b1c
+ 
Karsten Hopp d59b1c
+ 	  if (*IObuff == '`')
Karsten Hopp d59b1c
+ 	  {
Karsten Hopp d59b1c
+ 	      if (d > IObuff + 2 && d[-1] == '`')
Karsten Hopp d59b1c
+ 	      {
Karsten Hopp d59b1c
+ 		  /* remove the backticks from `command` */
Karsten Hopp d59b1c
+ 		  mch_memmove(IObuff, IObuff + 1, STRLEN(IObuff));
Karsten Hopp d59b1c
+ 		  d[-2] = NUL;
Karsten Hopp d59b1c
+ 	      }
Karsten Hopp d59b1c
+ 	      else if (d > IObuff + 3 && d[-2] == '`' && d[-1] == ',')
Karsten Hopp d59b1c
+ 	      {
Karsten Hopp d59b1c
+ 		  /* remove the backticks and comma from `command`, */
Karsten Hopp d59b1c
+ 		  mch_memmove(IObuff, IObuff + 1, STRLEN(IObuff));
Karsten Hopp d59b1c
+ 		  d[-3] = NUL;
Karsten Hopp d59b1c
+ 	      }
Karsten Hopp d59b1c
+ 	      else if (d > IObuff + 4 && d[-3] == '`'
Karsten Hopp d59b1c
+ 					     && d[-2] == '\\' && d[-1] == '.')
Karsten Hopp d59b1c
+ 	      {
Karsten Hopp d59b1c
+ 		  /* remove the backticks and dot from `command`\. */
Karsten Hopp d59b1c
+ 		  mch_memmove(IObuff, IObuff + 1, STRLEN(IObuff));
Karsten Hopp d59b1c
+ 		  d[-4] = NUL;
Karsten Hopp d59b1c
+ 	      }
Karsten Hopp d59b1c
+ 	  }
Karsten Hopp d59b1c
  	}
Karsten Hopp d59b1c
      }
Karsten Hopp d59b1c
  
Karsten Hopp d59b1c
*** ../vim-7.3.503/src/version.c	2012-04-25 12:28:05.000000000 +0200
Karsten Hopp d59b1c
--- src/version.c	2012-04-25 12:46:43.000000000 +0200
Karsten Hopp d59b1c
***************
Karsten Hopp d59b1c
*** 716,717 ****
Karsten Hopp d59b1c
--- 716,719 ----
Karsten Hopp d59b1c
  {   /* Add new patch number below this line */
Karsten Hopp d59b1c
+ /**/
Karsten Hopp d59b1c
+     504,
Karsten Hopp d59b1c
  /**/
Karsten Hopp d59b1c
Karsten Hopp d59b1c
-- 
Karsten Hopp d59b1c
TIM:   That is not an ordinary rabbit ... 'tis the most foul cruel and
Karsten Hopp d59b1c
       bad-tempered thing you ever set eyes on.
Karsten Hopp d59b1c
ROBIN: You tit.  I soiled my armour I was so scared!
Karsten Hopp d59b1c
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp d59b1c
Karsten Hopp d59b1c
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp d59b1c
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp d59b1c
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp d59b1c
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///