Remove EXMODE_NORMAL

This commit is contained in:
matveyt
2021-07-23 18:06:01 +02:00
committed by Björn Linse
parent 6f48c018b5
commit 8ce0929418
17 changed files with 50 additions and 327 deletions

View File

@@ -2230,20 +2230,22 @@ static int vgetorpeek(bool advance)
timedout = true;
continue;
}
/* When 'insertmode' is set, ESC just beeps in Insert
* mode. Use CTRL-L to make edit() return.
* For the command line only CTRL-C always breaks it.
* For the cmdline window: Alternate between ESC and
* CTRL-C: ESC for most situations and CTRL-C to close the
* cmdline window. */
if (p_im && (State & INSERT))
// When 'insertmode' is set, ESC just beeps in Insert
// mode. Use CTRL-L to make edit() return.
// In Ex-mode \n is compatible with original Vim behaviour.
// For the command line only CTRL-C always breaks it.
// For the cmdline window: Alternate between ESC and
// CTRL-C: ESC for most situations and CTRL-C to close the
// cmdline window.
if (p_im && (State & INSERT)) {
c = Ctrl_L;
else if ((State & CMDLINE)
|| (cmdwin_type > 0 && tc == ESC)
)
} else if (exmode_active) {
c = '\n';
} else if ((State & CMDLINE) || (cmdwin_type > 0 && tc == ESC)) {
c = Ctrl_C;
else
} else {
c = ESC;
}
tc = c;
break;
}