mirror of
https://github.com/neovim/neovim.git
synced 2025-09-11 22:08:18 +00: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:
@@ -7624,7 +7624,7 @@ void update_topline_cursor(void)
|
|||||||
*/
|
*/
|
||||||
static void ex_normal(exarg_T *eap)
|
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");
|
EMSG("Can't re-enter normal mode from terminal mode");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user