Problem: Unnessary VIM_ISDIGIT() calls, badly indented code.
Solution: Call skipdigits() on the next character. Improve indenting.
(Dominique Pellé, closes #8227)
}
if (VIM_ISDIGIT(*p))
c = getdigits(&p);
- else
- if (has_mbyte)
+ else if (has_mbyte)
c = mb_ptr2char_adv(&p);
else
c = *p++;
++p;
if (VIM_ISDIGIT(*p))
c2 = getdigits(&p);
- else
- if (has_mbyte)
+ else if (has_mbyte)
c2 = mb_ptr2char_adv(&p);
else
c2 = *p++;
else
#endif
if (t_colors > 1)
- modec = 'c';
- else
- modec = 't';
+ modec = 'c';
+ else
+ modec = 't';
}
switch (TOLOWER_ASC(what[0]))
* 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);
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)
cur_item = res;
init_tv(&item);
if (res != NULL)
- init_tv(res);
+ init_tv(res);
fill_numbuflen(reader);
p = reader->js_buf + reader->js_used;
op_formatexpr(oap); // use expression
else
#endif
+ {
if (*p_fp != NUL || *curbuf->b_p_fp != NUL)
- op_colon(oap); // use external command
- else
- op_format(oap, FALSE); // use internal function
+ op_colon(oap); // use external command
+ else
+ op_format(oap, FALSE); // use internal function
+ }
break;
-
case OP_FORMAT2:
op_format(oap, TRUE); // use internal function
break;
for (;;)
{
if (VIM_ISDIGIT(*str))
- str = skipdigits(str);
+ str = skipdigits(str + 1);
else if (*str == '/' || *str == '?')
{
str = skip_regexp(str + 1, *str, FALSE);
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2871,
/**/
2870,
/**/
}
#ifdef FEAT_PROFILE
- if (cctx->ctx_profiling && ((isn_T *)instr->ga_data)[instr->ga_len - 1]
- .isn_type == ISN_PROF_START)
- // move the profile start after "endtry" so that it's not counted when
- // the exception is rethrown.
- --instr->ga_len;
+ if (cctx->ctx_profiling && ((isn_T *)instr->ga_data)[instr->ga_len - 1]
+ .isn_type == ISN_PROF_START)
+ // move the profile start after "endtry" so that it's not counted when
+ // the exception is rethrown.
+ --instr->ga_len;
#endif
// Fill in the "end" label in jumps at the end of the blocks, if not