summaryrefslogtreecommitdiffstats
path: root/source/ap/vim/patches/7.3.504
blob: 752279060a8f94765af110ef0fb29e4b6c898965 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
To: vim_dev@googlegroups.com
Subject: Patch 7.3.504
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.504
Problem:    Commands in help files are not highlighted.
Solution:   Allow for commands in backticks.  Adjust CTRL-] to remove the
	    backticks.
Files:	    src/ex_cmds.c


*** ../vim-7.3.503/src/ex_cmds.c	2012-04-05 16:04:58.000000000 +0200
--- src/ex_cmds.c	2012-04-25 12:51:41.000000000 +0200
***************
*** 3421,3427 ****
  		     * and re-attach to buffer, perhaps.
  		     */
  		    if (curwin->w_s == &(curwin->w_buffer->b_s))
! 			    curwin->w_s = &(buf->b_s);
  #endif
  		    curwin->w_buffer = buf;
  		    curbuf = buf;
--- 3421,3427 ----
  		     * and re-attach to buffer, perhaps.
  		     */
  		    if (curwin->w_s == &(curwin->w_buffer->b_s))
! 			curwin->w_s = &(buf->b_s);
  #endif
  		    curwin->w_buffer = buf;
  		    curbuf = buf;
***************
*** 5965,5970 ****
--- 5965,5993 ----
  		break;
  	  }
  	  *d = NUL;
+ 
+ 	  if (*IObuff == '`')
+ 	  {
+ 	      if (d > IObuff + 2 && d[-1] == '`')
+ 	      {
+ 		  /* remove the backticks from `command` */
+ 		  mch_memmove(IObuff, IObuff + 1, STRLEN(IObuff));
+ 		  d[-2] = NUL;
+ 	      }
+ 	      else if (d > IObuff + 3 && d[-2] == '`' && d[-1] == ',')
+ 	      {
+ 		  /* remove the backticks and comma from `command`, */
+ 		  mch_memmove(IObuff, IObuff + 1, STRLEN(IObuff));
+ 		  d[-3] = NUL;
+ 	      }
+ 	      else if (d > IObuff + 4 && d[-3] == '`'
+ 					     && d[-2] == '\\' && d[-1] == '.')
+ 	      {
+ 		  /* remove the backticks and dot from `command`\. */
+ 		  mch_memmove(IObuff, IObuff + 1, STRLEN(IObuff));
+ 		  d[-4] = NUL;
+ 	      }
+ 	  }
  	}
      }
  
*** ../vim-7.3.503/src/version.c	2012-04-25 12:28:05.000000000 +0200
--- src/version.c	2012-04-25 12:46:43.000000000 +0200
***************
*** 716,717 ****
--- 716,719 ----
  {   /* Add new patch number below this line */
+ /**/
+     504,
  /**/

-- 
TIM:   That is not an ordinary rabbit ... 'tis the most foul cruel and
       bad-tempered thing you ever set eyes on.
ROBIN: You tit.  I soiled my armour I was so scared!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///