diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-07-30 16:52:24 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-07-30 16:52:24 +0200 |
commit | 423802d1a282df35078539970eabf559186e1ec8 (patch) | |
tree | 0a252bea57b2e78f9407066ebe3ca0a0a093cbc1 /src/main.c | |
parent | 68c4bdd53cb54b6c0dccb2dcee446ef42ef3dedd (diff) | |
download | vim-423802d1a282df35078539970eabf559186e1ec8.zip |
patch 8.0.0813: cannot use a terminal window while the job is running
Problem: Cannot use Vim commands in a terminal window while the job is
running.
Solution: Implement Terminal Normal mode.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c index 268c25627..81eb1a679 100644 --- a/src/main.c +++ b/src/main.c @@ -1356,11 +1356,17 @@ main_loop( else { #ifdef FEAT_TERMINAL - if (curbuf->b_term != NULL && oa.op_type == OP_NOP - && oa.regname == NUL) - terminal_loop(); + if (term_use_loop() && oa.op_type == OP_NOP && oa.regname == NUL) + { + /* If terminal_loop() returns OK we got a key that is handled + * in Normal model. With FAIL the terminal was closed and the + * screen needs to be redrawn. */ + if (terminal_loop() == OK) + normal_cmd(&oa, TRUE); + } + else #endif - normal_cmd(&oa, TRUE); + normal_cmd(&oa, TRUE); } } } |