Mercurial > vim
comparison src/testdir/test_terminal.vim @ 13835:8e583c52eb44 v8.0.1789
patch 8.0.1789: BufWinEnter does not work well for a terminal window
commit https://github.com/vim/vim/commit/606cb8b08ed510962fcdc8ef1abcc1fe35fbffef
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu May 3 20:40:20 2018 +0200
patch 8.0.1789: BufWinEnter does not work well for a terminal window
Problem: BufWinEnter does not work well for a terminal window.
Solution: Do not trigger BufWinEnter when opening a terminal window.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 03 May 2018 20:45:04 +0200 |
parents | 044337cbf854 |
children | 7f892e37b017 |
comparison
equal
deleted
inserted
replaced
13834:cdf8997299f7 | 13835:8e583c52eb44 |
---|---|
30 | 30 |
31 return buf | 31 return buf |
32 endfunc | 32 endfunc |
33 | 33 |
34 func Test_terminal_basic() | 34 func Test_terminal_basic() |
35 au BufWinEnter * if &buftype == 'terminal' | let b:done = 'yes' | endif | 35 au TerminalOpen * let b:done = 'yes' |
36 let buf = Run_shell_in_terminal({}) | 36 let buf = Run_shell_in_terminal({}) |
37 | 37 |
38 if has("unix") | 38 if has("unix") |
39 call assert_match('^/dev/', job_info(g:job).tty_out) | 39 call assert_match('^/dev/', job_info(g:job).tty_out) |
40 call assert_match('^/dev/', term_gettty('')) | 40 call assert_match('^/dev/', term_gettty('')) |
59 | 59 |
60 " closing window wipes out the terminal buffer a with finished job | 60 " closing window wipes out the terminal buffer a with finished job |
61 close | 61 close |
62 call assert_equal("", bufname(buf)) | 62 call assert_equal("", bufname(buf)) |
63 | 63 |
64 au! BufWinEnter | 64 au! TerminalOpen |
65 unlet g:job | 65 unlet g:job |
66 endfunc | 66 endfunc |
67 | 67 |
68 func Test_terminal_make_change() | 68 func Test_terminal_make_change() |
69 let buf = Run_shell_in_terminal({}) | 69 let buf = Run_shell_in_terminal({}) |