0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

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)
This commit is contained in:
zeertzjq
2022-07-31 18:34:32 +01:00
committed by Bram Moolenaar
parent c146d974f1
commit 101d57b34b
8 changed files with 257 additions and 265 deletions

View File

@@ -3749,51 +3749,52 @@ ins_ctrl_(void)
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;
}