summaryrefslogtreecommitdiffstats
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorDominique Pelle <dominique.pelle@gmail.com>2021-05-18 21:46:31 +0200
committerBram Moolenaar <Bram@vim.org>2021-05-18 21:46:31 +0200
commit4781d6fd8670af415c3b78f00d70036af85bd286 (patch)
tree48004675da2c28e5d478308d6a0da87da4d1ed67 /src/ex_docmd.c
parent796139ae3ac89e27ee96dce3c7fdb87d8c839f53 (diff)
patch 8.2.2871: unnessary VIM_ISDIGIT() calls, badly indented codev8.2.2871
Problem: Unnessary VIM_ISDIGIT() calls, badly indented code. Solution: Call skipdigits() on the next character. Improve indenting. (Dominique Pellé, closes #8227)
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 7811c8f7f3..2738f4f4d1 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -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)