diff src/testdir/test_popupwin.vim @ 17580:d5e5d0fc3fa8 v8.1.1787

patch 8.1.1787: cannot resize a popup window commit https://github.com/vim/vim/commit/9bcb70c18a740bf9d97a1420df5964618f218a89 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 1 21:11:05 2019 +0200 patch 8.1.1787: cannot resize a popup window Problem: Cannot resize a popup window. Solution: Allow for resizing by dragging the lower right corncer.
author Bram Moolenaar <Bram@vim.org>
date Thu, 01 Aug 2019 21:15:07 +0200
parents 8cca2654d459
children 506dd2efcbb2
line wrap: on
line diff
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -354,6 +354,7 @@ func Test_popup_drag()
 	call setline(1, range(1, 20))
 	let winid = popup_create(['1111', '222222', '33333'], #{
 	      \ drag: 1,
+	      \ resize: 1,
 	      \ border: [],
 	      \ line: &lines - 4,
 	      \ })
@@ -362,6 +363,11 @@ func Test_popup_drag()
 	endfunc
 	map <silent> <F3> :call test_setmouse(&lines - 4, &columns / 2)<CR>
 	map <silent> <F4> :call test_setmouse(&lines - 8, &columns / 2)<CR>
+	func Resize()
+	  call feedkeys("\<F5>\<LeftMouse>\<F6>\<LeftDrag>\<LeftRelease>", "xt")
+	endfunc
+	map <silent> <F5> :call test_setmouse(6, 41)<CR>
+	map <silent> <F6> :call test_setmouse(7, 45)<CR>
   END
   call writefile(lines, 'XtestPopupDrag')
   let buf = RunVimInTerminal('-S XtestPopupDrag', #{rows: 10})
@@ -370,6 +376,9 @@ func Test_popup_drag()
   call term_sendkeys(buf, ":call Dragit()\<CR>")
   call VerifyScreenDump(buf, 'Test_popupwin_drag_02', {})
 
+  call term_sendkeys(buf, ":call Resize()\<CR>")
+  call VerifyScreenDump(buf, 'Test_popupwin_drag_03', {})
+
   " clean up
   call StopVimInTerminal(buf)
   call delete('XtestPopupDrag')