mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 19:25:11 -07:00
ex_docmd: Fix terminal mode check condition for ex_normal
Using the `curbuf->terminal` condition alone is wrong since it does not necessarily mean nvim is in terminal mode. It needs to be used with `State & TERM_FOCUS` because the current buffer could have changed without `terminal_enter` exiting. Close #3403
This commit is contained in:
parent
0ca3f03c19
commit
2182cd6081
@ -7624,7 +7624,7 @@ void update_topline_cursor(void)
|
||||
*/
|
||||
static void ex_normal(exarg_T *eap)
|
||||
{
|
||||
if (curbuf->terminal) {
|
||||
if (curbuf->terminal && State & TERM_FOCUS) {
|
||||
EMSG("Can't re-enter normal mode from terminal mode");
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user