diff src/testdir/test_terminal.vim @ 22448:5e287462487e v8.2.1772

patch 8.2.1772: cannot use CTRL-W <Down> to move out of a terminal window Commit: https://github.com/vim/vim/commit/f43e7ac4eee22dbb26fc069ec9a3d1598ec8dfe9 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Sep 29 21:23:25 2020 +0200 patch 8.2.1772: cannot use CTRL-W <Down> to move out of a terminal window Problem: Cannot use CTRL-W <Down> to move out of a terminal window. Solution: Use special_to_buf() instead of mb_char2bytes(). (closes https://github.com/vim/vim/issues/7045)
author Bram Moolenaar <Bram@vim.org>
date Tue, 29 Sep 2020 21:30:03 +0200
parents 4373f3569140
children f7f2d73ff85e
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -1379,6 +1379,23 @@ func Test_terminal_statusline()
   set statusline=
 endfunc
 
+func Test_terminal_window_focus()
+  let winid1 = win_getid()
+  terminal
+  let winid2 = win_getid()
+  call feedkeys("\<C-W>j", 'xt')
+  call assert_equal(winid1, win_getid())
+  call feedkeys("\<C-W>k", 'xt')
+  call assert_equal(winid2, win_getid())
+  " can use a cursor key here
+  call feedkeys("\<C-W>\<Down>", 'xt')
+  call assert_equal(winid1, win_getid())
+  call feedkeys("\<C-W>\<Up>", 'xt')
+  call assert_equal(winid2, win_getid())
+
+  bwipe!
+endfunc
+
 func Api_drop_common(options)
   call assert_equal(1, winnr('$'))