aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-12-30 08:27:56 +0100
committerGitHub <noreply@github.com>2019-12-30 08:27:56 +0100
commit00af06b3728e16155e08833e7e7708c495f500de (patch)
tree2d90915886e5643d72d1733733fc02533f50c920 /src/nvim/testdir
parent34a59242a0d42687a49119cca590e7b4203496ef (diff)
parent5e1cad6d3378398c059e1a7144e1310b7bcb2398 (diff)
downloadrneovim-00af06b3728e16155e08833e7e7708c495f500de.tar.gz
rneovim-00af06b3728e16155e08833e7e7708c495f500de.tar.bz2
rneovim-00af06b3728e16155e08833e7e7708c495f500de.zip
Merge #11616 from janlazo/vim-8.0.1491
vim-patch:8.0.{1356,1491,1495,1522,1538,1540},8.1.{554,670,1300,1303,1875,2377}
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_popup.vim31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_popup.vim b/src/nvim/testdir/test_popup.vim
index 9db6112eeb..e5696f4cbb 100644
--- a/src/nvim/testdir/test_popup.vim
+++ b/src/nvim/testdir/test_popup.vim
@@ -733,6 +733,28 @@ func Test_popup_and_preview_autocommand()
bw!
endfunc
+func Test_popup_and_previewwindow_dump()
+ if !CanRunVimInTerminal()
+ return
+ endif
+ call writefile([
+ \ 'set previewheight=9',
+ \ 'silent! pedit',
+ \ 'call setline(1, map(repeat(["ab"], 10), "v:val. v:key"))',
+ \ 'exec "norm! G\<C-E>\<C-E>"',
+ \ ], 'Xscript')
+ let buf = RunVimInTerminal('-S Xscript', {})
+
+ " Test that popup and previewwindow do not overlap.
+ call term_sendkeys(buf, "o\<C-X>\<C-N>")
+ sleep 100m
+ call VerifyScreenDump(buf, 'Test_popup_and_previewwindow_01', {})
+
+ call term_sendkeys(buf, "\<Esc>u")
+ call StopVimInTerminal(buf)
+ call delete('Xscript')
+endfunc
+
func Test_popup_position()
if !CanRunVimInTerminal()
return
@@ -762,6 +784,15 @@ func Test_popup_position()
call term_sendkeys(buf, "GA\<C-N>")
call VerifyScreenDump(buf, 'Test_popup_position_03', {'rows': 8})
+ " completed text wider than the window and 'pumwidth' smaller than available
+ " space
+ call term_sendkeys(buf, "\<Esc>u")
+ call term_sendkeys(buf, ":set pumwidth=20\<CR>")
+ call term_sendkeys(buf, "ggI123456789_\<Esc>")
+ call term_sendkeys(buf, "jI123456789_\<Esc>")
+ call term_sendkeys(buf, "GA\<C-N>")
+ call VerifyScreenDump(buf, 'Test_popup_position_04', {'rows': 10})
+
call term_sendkeys(buf, "\<Esc>u")
call StopVimInTerminal(buf)
call delete('Xtest')