patch 9.0.0124: code has more indent than needed
Problem: Code has more indent than needed.
Solution: Use continue and return statements. (closes #10824)
diff --git a/src/edit.c b/src/edit.c
index 54c53ff..0e715c2 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -3749,51 +3749,52 @@
static int
ins_start_select(int c)
{
- if (km_startsel)
- switch (c)
- {
- case K_KHOME:
- case K_KEND:
- case K_PAGEUP:
- case K_KPAGEUP:
- case K_PAGEDOWN:
- case K_KPAGEDOWN:
+ if (!km_startsel)
+ return FALSE;
+ switch (c)
+ {
+ case K_KHOME:
+ case K_KEND:
+ case K_PAGEUP:
+ case K_KPAGEUP:
+ case K_PAGEDOWN:
+ case K_KPAGEDOWN:
# ifdef MACOS_X
- case K_LEFT:
- case K_RIGHT:
- case K_UP:
- case K_DOWN:
- case K_END:
- case K_HOME:
+ case K_LEFT:
+ case K_RIGHT:
+ case K_UP:
+ case K_DOWN:
+ case K_END:
+ case K_HOME:
# endif
- if (!(mod_mask & MOD_MASK_SHIFT))
- break;
- // FALLTHROUGH
- case K_S_LEFT:
- case K_S_RIGHT:
- case K_S_UP:
- case K_S_DOWN:
- case K_S_END:
- case K_S_HOME:
- // Start selection right away, the cursor can move with
- // CTRL-O when beyond the end of the line.
- start_selection();
+ if (!(mod_mask & MOD_MASK_SHIFT))
+ break;
+ // FALLTHROUGH
+ case K_S_LEFT:
+ case K_S_RIGHT:
+ case K_S_UP:
+ case K_S_DOWN:
+ case K_S_END:
+ case K_S_HOME:
+ // Start selection right away, the cursor can move with CTRL-O when
+ // beyond the end of the line.
+ start_selection();
- // Execute the key in (insert) Select mode.
- stuffcharReadbuff(Ctrl_O);
- if (mod_mask)
- {
- char_u buf[4];
+ // Execute the key in (insert) Select mode.
+ stuffcharReadbuff(Ctrl_O);
+ if (mod_mask)
+ {
+ char_u buf[4];
- buf[0] = K_SPECIAL;
- buf[1] = KS_MODIFIER;
- buf[2] = mod_mask;
- buf[3] = NUL;
- stuffReadbuff(buf);
- }
- stuffcharReadbuff(c);
- return TRUE;
- }
+ buf[0] = K_SPECIAL;
+ buf[1] = KS_MODIFIER;
+ buf[2] = mod_mask;
+ buf[3] = NUL;
+ stuffReadbuff(buf);
+ }
+ stuffcharReadbuff(c);
+ return TRUE;
+ }
return FALSE;
}