Mercurial > vim
diff src/testdir/test_popupwin.vim @ 17055:f4de7ccdfd8c v8.1.1527
patch 8.1.1527: when moving popup window over the cmdline it is not redrawn
commit https://github.com/vim/vim/commit/a540f8aa3b2570f1d903b63413301ec3d48b27d5
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jun 14 19:23:57 2019 +0200
patch 8.1.1527: when moving popup window over the cmdline it is not redrawn
Problem: When moving a popup window over the command line it is not
redrawn.
Solution: Redraw the command line. Move popup redrawing code to the popupwin
file.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 14 Jun 2019 19:30:05 +0200 |
parents | 6400d1ad5e4b |
children | 76ae212a9075 |
line wrap: on
line diff
--- a/src/testdir/test_popupwin.vim +++ b/src/testdir/test_popupwin.vim @@ -289,6 +289,36 @@ func Test_popup_firstline() call delete('XtestPopupFirstline') endfunc +func Test_popup_drag() + if !CanRunVimInTerminal() + throw 'Skipped: cannot make screendumps' + endif + " create a popup that covers the command line + let lines =<< trim END + call setline(1, range(1, 20)) + let winid = popup_create(['1111', '222222', '33333'], { + \ 'drag': 1, + \ 'border': [], + \ 'line': &lines - 4, + \ }) + func Dragit() + call feedkeys("\<F3>\<LeftMouse>\<F4>\<LeftDrag>\<LeftRelease>", "xt") + endfunc + map <silent> <F3> :call test_setmouse(&lines - 4, &columns / 2)<CR> + map <silent> <F4> :call test_setmouse(&lines - 8, &columns / 2)<CR> + END + call writefile(lines, 'XtestPopupDrag') + let buf = RunVimInTerminal('-S XtestPopupDrag', {'rows': 10}) + call VerifyScreenDump(buf, 'Test_popupwin_drag_01', {}) + + call term_sendkeys(buf, ":call Dragit()\<CR>") + call VerifyScreenDump(buf, 'Test_popupwin_drag_02', {}) + + " clean up + call StopVimInTerminal(buf) + call delete('XtestPopupDrag') +endfunc + func Test_popup_in_tab() " default popup is local to tab, not visible when in other tab let winid = popup_create("text", {})