aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_window_cmd.vim
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-08-18 13:05:17 +0200
committerGitHub <noreply@github.com>2019-08-18 13:05:17 +0200
commitc5efa9c352d63febd30764c04738f81e512b19f6 (patch)
treed897e97ba00cabe3028e4978ce95ac527cfeac86 /src/nvim/testdir/test_window_cmd.vim
parentb7ce589cb879030b70d5b01aaa6bf1e521f5b9cb (diff)
parent454adf15db07eebd4509e0256f4e20ef06db1d6e (diff)
downloadrneovim-c5efa9c352d63febd30764c04738f81e512b19f6.tar.gz
rneovim-c5efa9c352d63febd30764c04738f81e512b19f6.tar.bz2
rneovim-c5efa9c352d63febd30764c04738f81e512b19f6.zip
Merge #10800 from janlazo/vim-8.1.1870
vim-patch:8.1.{1679,1839,1870}
Diffstat (limited to 'src/nvim/testdir/test_window_cmd.vim')
-rw-r--r--src/nvim/testdir/test_window_cmd.vim19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_window_cmd.vim b/src/nvim/testdir/test_window_cmd.vim
index 2a07a04401..c87c0a0af4 100644
--- a/src/nvim/testdir/test_window_cmd.vim
+++ b/src/nvim/testdir/test_window_cmd.vim
@@ -42,6 +42,8 @@ function Test_window_cmd_wincmd_gf()
function s:swap_exists()
let v:swapchoice = s:swap_choice
endfunc
+ " Remove the catch-all that runtest.vim adds
+ au! SwapExists
augroup test_window_cmd_wincmd_gf
autocmd!
exec "autocmd SwapExists " . fname . " call s:swap_exists()"
@@ -144,6 +146,21 @@ func Test_window_preview()
call assert_fails('wincmd P', 'E441:')
endfunc
+func Test_window_preview_from_help()
+ filetype on
+ call writefile(['/* some C code */'], 'Xpreview.c')
+ help
+ pedit Xpreview.c
+ wincmd P
+ call assert_equal(1, &previewwindow)
+ call assert_equal('c', &filetype)
+ wincmd z
+
+ filetype off
+ close
+ call delete('Xpreview.c')
+endfunc
+
func Test_window_exchange()
e Xa
@@ -519,6 +536,7 @@ func Test_winrestcmd()
endfunc
function! Fun_RenewFile()
+ " Need to wait a bit for the timestamp to be older.
sleep 2
silent execute '!echo "1" > tmp.txt'
sp
@@ -536,7 +554,6 @@ func Test_window_prevwin()
call writefile(['2'], 'tmp.txt')
new tmp.txt
q
- " Need to wait a bit for the timestamp to be older.
call Fun_RenewFile()
call assert_equal(2, winnr())
wincmd p