Mercurial > vim
changeset 3480:17bfcb054cb7 v7.3.504
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.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 25 Apr 2012 12:57:28 +0200 |
parents | 840378901d17 |
children | 68f90c98dc33 |
files | src/ex_cmds.c src/version.c |
diffstat | 2 files changed, 26 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -3421,7 +3421,7 @@ do_ecmd(fnum, ffname, sfname, eap, newln * and re-attach to buffer, perhaps. */ if (curwin->w_s == &(curwin->w_buffer->b_s)) - curwin->w_s = &(buf->b_s); + curwin->w_s = &(buf->b_s); #endif curwin->w_buffer = buf; curbuf = buf; @@ -5965,6 +5965,29 @@ find_help_tags(arg, num_matches, matches 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; + } + } } }