aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-12-26 13:21:35 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-12-29 18:34:04 -0500
commit1d3d84fe818efaf47d8f818fcc44368d144443a1 (patch)
tree0de6e138abf1af7ed185e1e996f934e26b368468 /src/nvim/testdir
parent51c9e3c4d19f26af11a86a8f736a74a5cb6f2fa2 (diff)
downloadrneovim-1d3d84fe818efaf47d8f818fcc44368d144443a1.tar.gz
rneovim-1d3d84fe818efaf47d8f818fcc44368d144443a1.tar.bz2
rneovim-1d3d84fe818efaf47d8f818fcc44368d144443a1.zip
vim-patch:8.1.0554: popup menu overlaps with preview window
Problem: Popup menu overlaps with preview window. Solution: Adjust the height computation. (Hirohito Higashi, closes vim/vim#3414) https://github.com/vim/vim/commit/614ab8aa00346724bfc27980d25985d482269b75 Cherry-picked "row -> pum_win_row" rename changes from patch 8.1.0062.
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_popup.vim22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_popup.vim b/src/nvim/testdir/test_popup.vim
index 9db6112eeb..27c90f9114 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