To: vim_dev@googlegroups.com Subject: Patch 8.1.1560 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1560 Problem: Popup window hidden option not implemented yet. Solution: Implement the hidden option. Files: src/popupwin.c, src/testdir/test_popupwin.vim *** ../vim-8.1.1559/src/popupwin.c 2019-06-16 20:08:52.585130260 +0200 --- src/popupwin.c 2019-06-16 20:26:04.678956382 +0200 *************** *** 428,433 **** --- 428,440 ---- semsg(_(e_invarg2), tv_get_string(&di->di_tv)); } + nr = dict_get_number(dict, (char_u *)"hidden"); + if (nr > 0) + { + wp->w_popup_flags |= POPF_HIDDEN; + --wp->w_buffer->b_nwindows; + } + popup_mask_refresh = TRUE; } *** ../vim-8.1.1559/src/testdir/test_popupwin.vim 2019-06-16 20:08:52.589130235 +0200 --- src/testdir/test_popupwin.vim 2019-06-16 20:37:29.358863483 +0200 *************** *** 1310,1316 **** call delete('XtestNotifications') endfunc ! function Test_popup_settext() if !CanRunVimInTerminal() throw 'Skipped: cannot make screendumps' endif --- 1310,1316 ---- call delete('XtestNotifications') endfunc ! func Test_popup_settext() if !CanRunVimInTerminal() throw 'Skipped: cannot make screendumps' endif *************** *** 1352,1355 **** " clean up call StopVimInTerminal(buf) call delete('XtestPopupSetText') ! endfunction --- 1352,1389 ---- " clean up call StopVimInTerminal(buf) call delete('XtestPopupSetText') ! endfunc ! ! func Test_popup_hidden() ! new ! ! let winid = popup_atcursor('text', {'hidden': 1}) ! redraw ! call assert_equal(0, popup_getpos(winid).visible) ! call popup_close(winid) ! ! let winid = popup_create('text', {'hidden': 1}) ! redraw ! call assert_equal(0, popup_getpos(winid).visible) ! call popup_close(winid) ! ! func QuitCallback(id, res) ! let s:cb_winid = a:id ! let s:cb_res = a:res ! endfunc ! let winid = popup_dialog('make a choice', {'hidden': 1, ! \ 'filter': 'popup_filter_yesno', ! \ 'callback': 'QuitCallback', ! \ }) ! redraw ! call assert_equal(0, popup_getpos(winid).visible) ! exe "normal anot used by filter\" ! call assert_equal('not used by filter', getline(1)) ! ! call popup_show(winid) ! call feedkeys('y', "xt") ! call assert_equal(1, s:cb_res) ! ! bwipe! ! delfunc QuitCallback ! endfunc *** ../vim-8.1.1559/src/version.c 2019-06-16 20:08:52.589130235 +0200 --- src/version.c 2019-06-16 20:27:59.614321111 +0200 *************** *** 779,780 **** --- 779,782 ---- { /* Add new patch number below this line */ + /**/ + 1560, /**/ -- hundred-and-one symptoms of being an internet addict: 212. Your Internet group window has more icons than your Accessories window. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///