mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.2871: unnessary VIM_ISDIGIT() calls, badly indented code
Problem: Unnessary VIM_ISDIGIT() calls, badly indented code. Solution: Call skipdigits() on the next character. Improve indenting. (Dominique Pellé, closes #8227)
This commit is contained in:
committed by
Bram Moolenaar
parent
796139ae3a
commit
4781d6fd86
@@ -2384,7 +2384,7 @@ do_one_cmd(
|
||||
* count, it's a buffer name.
|
||||
*/
|
||||
if ((ea.argt & EX_COUNT) && VIM_ISDIGIT(*ea.arg)
|
||||
&& (!(ea.argt & EX_BUFNAME) || *(p = skipdigits(ea.arg)) == NUL
|
||||
&& (!(ea.argt & EX_BUFNAME) || *(p = skipdigits(ea.arg + 1)) == NUL
|
||||
|| VIM_ISWHITE(*p)))
|
||||
{
|
||||
n = getdigits(&ea.arg);
|
||||
@@ -3730,7 +3730,7 @@ modifier_len(char_u *cmd)
|
||||
char_u *p = cmd;
|
||||
|
||||
if (VIM_ISDIGIT(*cmd))
|
||||
p = skipwhite(skipdigits(cmd));
|
||||
p = skipwhite(skipdigits(cmd + 1));
|
||||
for (i = 0; i < (int)(sizeof(cmdmods) / sizeof(struct cmdmod)); ++i)
|
||||
{
|
||||
for (j = 0; p[j] != NUL; ++j)
|
||||
|
Reference in New Issue
Block a user