Mercurial > vim
comparison src/main.c @ 11866:be40c8a9240d v8.0.0813
patch 8.0.0813: cannot use a terminal window while the job is running
commit https://github.com/vim/vim/commit/423802d1a282df35078539970eabf559186e1ec8
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 30 16:52:24 2017 +0200
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 30 Jul 2017 17:00:04 +0200 |
parents | 1ce1376fbbf8 |
children | d036c1c8537d |
comparison
equal
deleted
inserted
replaced
11865:6bdac11ae12a | 11866:be40c8a9240d |
---|---|
1354 do_exmode(exmode_active == EXMODE_VIM); | 1354 do_exmode(exmode_active == EXMODE_VIM); |
1355 } | 1355 } |
1356 else | 1356 else |
1357 { | 1357 { |
1358 #ifdef FEAT_TERMINAL | 1358 #ifdef FEAT_TERMINAL |
1359 if (curbuf->b_term != NULL && oa.op_type == OP_NOP | 1359 if (term_use_loop() && oa.op_type == OP_NOP && oa.regname == NUL) |
1360 && oa.regname == NUL) | 1360 { |
1361 terminal_loop(); | 1361 /* If terminal_loop() returns OK we got a key that is handled |
1362 #endif | 1362 * in Normal model. With FAIL the terminal was closed and the |
1363 normal_cmd(&oa, TRUE); | 1363 * screen needs to be redrawn. */ |
1364 if (terminal_loop() == OK) | |
1365 normal_cmd(&oa, TRUE); | |
1366 } | |
1367 else | |
1368 #endif | |
1369 normal_cmd(&oa, TRUE); | |
1364 } | 1370 } |
1365 } | 1371 } |
1366 } | 1372 } |
1367 | 1373 |
1368 | 1374 |