diff src/testdir/test_popupwin.vim @ 16894:236c182c6300 v8.1.1448

patch 8.1.1448: statusline is sometimes drawn on top of popup commit https://github.com/vim/vim/commit/988c43310a8dcfad9fbacd110b50ba220227d19a Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 2 14:12:11 2019 +0200 patch 8.1.1448: statusline is sometimes drawn on top of popup Problem: Statusline is sometimes drawn on top of popup. Solution: Redraw popups after the statusline. (Naruhiko Nishino, closes #4468)
author Bram Moolenaar <Bram@vim.org>
date Sun, 02 Jun 2019 14:15:06 +0200
parents 60c9ac14a2ec
children 52fc577a087d
line wrap: on
line diff
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -610,3 +610,40 @@ func Test_popup_empty()
   call assert_equal(2, pos.width)
   call assert_equal(3, pos.height)
 endfunc
+
+func Test_popup_never_behind()
+  if !CanRunVimInTerminal()
+    return
+  endif
+  " +-----------------------------+
+  " |             |               |
+  " |             |               |
+  " |             |               |
+  " |            line1            |
+  " |------------line2------------|
+  " |            line3            |
+  " |            line4            |
+  " |                             |
+  " |                             |
+  " +-----------------------------+
+  let lines =<< trim END
+    only 
+    split
+    vsplit
+    let info_window1 = getwininfo()[0]
+    let line = info_window1['height']
+    let col = info_window1['width']
+    call popup_create(['line1', 'line2', 'line3', 'line4'], {
+	      \   'line' : line,
+	      \   'col' : col,
+	      \ })
+  END
+  call writefile(lines, 'XtestPopupBehind')
+  let buf = RunVimInTerminal('-S XtestPopupBehind', {'rows': 10})
+  call term_sendkeys(buf, "\<C-W>w")
+  call VerifyScreenDump(buf, 'Test_popupwin_behind', {})
+
+  " clean up
+  call StopVimInTerminal(buf)
+  call delete('XtestPopupBehind')
+endfunc