Skip to content

Commit d9dceee

Browse files
committed
updated for version 7.3.504
Problem: Commands in help files are not highlighted. Solution: Allow for commands in backticks. Adjust CTRL-] to remove the backticks.
1 parent c306853 commit d9dceee

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

src/ex_cmds.c

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3421,7 +3421,7 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin)
34213421
* and re-attach to buffer, perhaps.
34223422
*/
34233423
if (curwin->w_s == &(curwin->w_buffer->b_s))
3424-
curwin->w_s = &(buf->b_s);
3424+
curwin->w_s = &(buf->b_s);
34253425
#endif
34263426
curwin->w_buffer = buf;
34273427
curbuf = buf;
@@ -5965,6 +5965,29 @@ find_help_tags(arg, num_matches, matches, keep_lang)
59655965
break;
59665966
}
59675967
*d = NUL;
5968+
5969+
if (*IObuff == '`')
5970+
{
5971+
if (d > IObuff + 2 && d[-1] == '`')
5972+
{
5973+
/* remove the backticks from `command` */
5974+
mch_memmove(IObuff, IObuff + 1, STRLEN(IObuff));
5975+
d[-2] = NUL;
5976+
}
5977+
else if (d > IObuff + 3 && d[-2] == '`' && d[-1] == ',')
5978+
{
5979+
/* remove the backticks and comma from `command`, */
5980+
mch_memmove(IObuff, IObuff + 1, STRLEN(IObuff));
5981+
d[-3] = NUL;
5982+
}
5983+
else if (d > IObuff + 4 && d[-3] == '`'
5984+
&& d[-2] == '\\' && d[-1] == '.')
5985+
{
5986+
/* remove the backticks and dot from `command`\. */
5987+
mch_memmove(IObuff, IObuff + 1, STRLEN(IObuff));
5988+
d[-4] = NUL;
5989+
}
5990+
}
59685991
}
59695992
}
59705993

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,8 @@ static char *(features[]) =
714714

715715
static int included_patches[] =
716716
{ /* Add new patch number below this line */
717+
/**/
718+
504,
717719
/**/
718720
503,
719721
/**/

0 commit comments

Comments
 (0)