comparison src/ex_cmds.c @ 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 8691bdcdbf66
children fe7bf24804e1
comparison
equal deleted inserted replaced
3479:840378901d17 3480:17bfcb054cb7
3419 /* 3419 /*
3420 * <VN> We could instead free the synblock 3420 * <VN> We could instead free the synblock
3421 * and re-attach to buffer, perhaps. 3421 * and re-attach to buffer, perhaps.
3422 */ 3422 */
3423 if (curwin->w_s == &(curwin->w_buffer->b_s)) 3423 if (curwin->w_s == &(curwin->w_buffer->b_s))
3424 curwin->w_s = &(buf->b_s); 3424 curwin->w_s = &(buf->b_s);
3425 #endif 3425 #endif
3426 curwin->w_buffer = buf; 3426 curwin->w_buffer = buf;
3427 curbuf = buf; 3427 curbuf = buf;
3428 ++curbuf->b_nwindows; 3428 ++curbuf->b_nwindows;
3429 /* set 'fileformat' */ 3429 /* set 'fileformat' */
5963 */ 5963 */
5964 if (*s == '\'' && s > arg && *arg == '\'') 5964 if (*s == '\'' && s > arg && *arg == '\'')
5965 break; 5965 break;
5966 } 5966 }
5967 *d = NUL; 5967 *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 }
5968 } 5991 }
5969 } 5992 }
5970 5993
5971 *matches = (char_u **)""; 5994 *matches = (char_u **)"";
5972 *num_matches = 0; 5995 *num_matches = 0;