Mercurial > vim
comparison src/menu.c @ 11127:506f5d8b7d8b v8.0.0451
patch 8.0.0451: some macros are in lower case
commit https://github.com/vim/vim/commit/91acfffc1e6c0d8c2abfb186a0e79a5bf19c3f3f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 12 19:22:36 2017 +0100
patch 8.0.0451: some macros are in lower case
Problem: Some macros are in lower case.
Solution: Make a few more macros upper case. Avoid lower case macros use an
argument twice.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 12 Mar 2017 19:30:05 +0100 |
parents | eb3a2ff3309a |
children | f4ea50924c6d |
comparison
equal
deleted
inserted
replaced
11126:48599a3eae0b | 11127:506f5d8b7d8b |
---|---|
150 #endif | 150 #endif |
151 while (*arg != NUL && *arg != ' ') | 151 while (*arg != NUL && *arg != ' ') |
152 { | 152 { |
153 if (*arg == '\\') | 153 if (*arg == '\\') |
154 STRMOVE(arg, arg + 1); | 154 STRMOVE(arg, arg + 1); |
155 mb_ptr_adv(arg); | 155 MB_PTR_ADV(arg); |
156 } | 156 } |
157 if (*arg != NUL) | 157 if (*arg != NUL) |
158 { | 158 { |
159 *arg++ = NUL; | 159 *arg++ = NUL; |
160 arg = skipwhite(arg); | 160 arg = skipwhite(arg); |
659 char_u *s; | 659 char_u *s; |
660 int idx; | 660 int idx; |
661 | 661 |
662 STRCPY(tearpath, menu_path); | 662 STRCPY(tearpath, menu_path); |
663 idx = (int)(next_name - path_name - 1); | 663 idx = (int)(next_name - path_name - 1); |
664 for (s = tearpath; *s && s < tearpath + idx; mb_ptr_adv(s)) | 664 for (s = tearpath; *s && s < tearpath + idx; MB_PTR_ADV(s)) |
665 { | 665 { |
666 if ((*s == '\\' || *s == Ctrl_V) && s[1]) | 666 if ((*s == '\\' || *s == Ctrl_V) && s[1]) |
667 { | 667 { |
668 ++idx; | 668 ++idx; |
669 ++s; | 669 ++s; |
1470 char_u * | 1470 char_u * |
1471 menu_name_skip(char_u *name) | 1471 menu_name_skip(char_u *name) |
1472 { | 1472 { |
1473 char_u *p; | 1473 char_u *p; |
1474 | 1474 |
1475 for (p = name; *p && *p != '.'; mb_ptr_adv(p)) | 1475 for (p = name; *p && *p != '.'; MB_PTR_ADV(p)) |
1476 { | 1476 { |
1477 if (*p == '\\' || *p == Ctrl_V) | 1477 if (*p == '\\' || *p == Ctrl_V) |
1478 { | 1478 { |
1479 STRMOVE(p, p + 1); | 1479 STRMOVE(p, p + 1); |
1480 if (*p == NUL) | 1480 if (*p == NUL) |
2483 static void | 2483 static void |
2484 menu_unescape_name(char_u *name) | 2484 menu_unescape_name(char_u *name) |
2485 { | 2485 { |
2486 char_u *p; | 2486 char_u *p; |
2487 | 2487 |
2488 for (p = name; *p && *p != '.'; mb_ptr_adv(p)) | 2488 for (p = name; *p && *p != '.'; MB_PTR_ADV(p)) |
2489 if (*p == '\\') | 2489 if (*p == '\\') |
2490 STRMOVE(p, p + 1); | 2490 STRMOVE(p, p + 1); |
2491 } | 2491 } |
2492 #endif /* FEAT_MULTI_LANG */ | 2492 #endif /* FEAT_MULTI_LANG */ |
2493 | 2493 |