diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-06-17 22:19:12 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-06-17 22:19:12 +0200 |
commit | dcdeaaf1505b96aa7a31ccd4becc92c32119bdda (patch) | |
tree | 52bde88c1e1a7be98f75ceeed8f104799ed41f2d /src/terminal.c | |
parent | b3307b5e7e7bd3962b0d5c61a94e638564c146b0 (diff) | |
download | vim-git-dcdeaaf1505b96aa7a31ccd4becc92c32119bdda.tar.gz |
patch 8.1.0072: use of 'termwinkey' is inconsistentv8.1.0072
Problem: Use of 'termwinkey' is inconsistent.
Solution: Change the documentation and the behavior. (Ken Takata)
Diffstat (limited to 'src/terminal.c')
-rw-r--r-- | src/terminal.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/terminal.c b/src/terminal.c index 9b7bc038d..f4fa55165 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -2107,7 +2107,11 @@ terminal_loop(int blocking) in_terminal_loop = curbuf->b_term; if (*curwin->w_p_twk != NUL) + { termwinkey = string_to_key(curwin->w_p_twk, TRUE); + if (termwinkey == Ctrl_W) + termwinkey = 0; + } position_cursor(curwin, &curbuf->b_term->tl_cursor_pos); may_set_cursor_props(curbuf->b_term); @@ -2203,12 +2207,13 @@ terminal_loop(int blocking) /* "CTRL-W CTRL-C" or 'termwinkey' CTRL-C: end the job */ mch_signal_job(curbuf->b_term->tl_job, (char_u *)"kill"); } - else if (termwinkey == 0 && c == '.') + else if (c == '.') { /* "CTRL-W .": send CTRL-W to the job */ - c = Ctrl_W; + /* "'termwinkey' .": send 'termwinkey' to the job */ + c = termwinkey == 0 ? Ctrl_W : termwinkey; } - else if (termwinkey == 0 && c == Ctrl_BSL) + else if (c == Ctrl_BSL) { /* "CTRL-W CTRL-\": send CTRL-\ to the job */ c = Ctrl_BSL; |