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)
diff --git a/src/charset.c b/src/charset.c
index 10aa2e8..fcaeedf 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -169,8 +169,7 @@
 	    }
 	    if (VIM_ISDIGIT(*p))
 		c = getdigits(&p);
-	    else
-		 if (has_mbyte)
+	    else if (has_mbyte)
 		c = mb_ptr2char_adv(&p);
 	    else
 		c = *p++;
@@ -180,8 +179,7 @@
 		++p;
 		if (VIM_ISDIGIT(*p))
 		    c2 = getdigits(&p);
-		else
-		     if (has_mbyte)
+		else if (has_mbyte)
 		    c2 = mb_ptr2char_adv(&p);
 		else
 		    c2 = *p++;
diff --git a/src/evalfunc.c b/src/evalfunc.c
index e740f91..16447ab 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -9674,9 +9674,9 @@
 	else
 #endif
 	    if (t_colors > 1)
-	    modec = 'c';
-	else
-	    modec = 't';
+		modec = 'c';
+	    else
+		modec = 't';
     }
 
     switch (TOLOWER_ASC(what[0]))
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 7811c8f..2738f4f 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -2384,7 +2384,7 @@
      * 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 @@
     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)
diff --git a/src/json.c b/src/json.c
index 25349b7..db25b70 100644
--- a/src/json.c
+++ b/src/json.c
@@ -607,7 +607,7 @@
     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;
diff --git a/src/ops.c b/src/ops.c
index d8e96ff..e4590a1 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -3985,12 +3985,13 @@
 		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;
diff --git a/src/tag.c b/src/tag.c
index 4eb7a4f..256f885 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -3824,7 +3824,7 @@
     for (;;)
     {
 	if (VIM_ISDIGIT(*str))
-	    str = skipdigits(str);
+	    str = skipdigits(str + 1);
 	else if (*str == '/' || *str == '?')
 	{
 	    str = skip_regexp(str + 1, *str, FALSE);
diff --git a/src/version.c b/src/version.c
index edc95e5..8d73f68 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2871,
+/**/
     2870,
 /**/
     2869,
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 160c8e4..5e912dd 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -8341,11 +8341,11 @@
 	}
 
 #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