To: vim_dev@googlegroups.com Subject: Patch 8.2.1303 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1303 Problem: Calling popup_setoptions() resets 'signcolumn'. Solution: Only set 'signcolumn' when creating the popup. (closes #6542) Files: src/popupwin.c, src/testdir/test_popupwin.vim *** ../vim-8.2.1302/src/popupwin.c 2020-07-18 21:40:22.800647319 +0200 --- src/popupwin.c 2020-07-26 22:20:09.764634644 +0200 *************** *** 740,747 **** set_string_option_direct_in_win(wp, (char_u *)"wincolor", -1, str, OPT_FREE|OPT_LOCAL, 0); - set_string_option_direct_in_win(wp, (char_u *)"signcolumn", -1, - (char_u *)"no", OPT_FREE|OPT_LOCAL, 0); set_padding_border(dict, wp->w_popup_padding, "padding", 999); set_padding_border(dict, wp->w_popup_border, "border", 1); --- 740,745 ---- *************** *** 946,951 **** --- 944,953 ---- int nr; apply_move_options(wp, dict); + + set_string_option_direct_in_win(wp, (char_u *)"signcolumn", -1, + (char_u *)"no", OPT_FREE|OPT_LOCAL, 0); + apply_general_options(wp, dict); nr = dict_get_number(dict, (char_u *)"hidden"); *** ../vim-8.2.1302/src/testdir/test_popupwin.vim 2020-07-18 16:07:02.005864389 +0200 --- src/testdir/test_popupwin.vim 2020-07-26 22:17:49.313039558 +0200 *************** *** 3115,3120 **** --- 3115,3125 ---- call term_sendkeys(buf, "a\\") call VerifyScreenDump(buf, 'Test_popupwin_infopopup_8', {}) + call term_sendkeys(buf, " \") + call term_sendkeys(buf, ":set completepopup+=width:10\") + call term_sendkeys(buf, "a\\") + call VerifyScreenDump(buf, 'Test_popupwin_infopopup_9', {}) + call term_sendkeys(buf, "\") call StopVimInTerminal(buf) call delete('XtestInfoPopup') *************** *** 3436,3441 **** --- 3441,3451 ---- normal! ggg$ let winid = popup_atcursor(repeat('x', 500), #{moved: 'any', border: []}) + " 'signcolumn' was getting reset + call setwinvar(winid, '&signcolumn', 'yes') + call popup_setoptions(winid, {'zindex': 1000}) + call assert_equal('yes', getwinvar(winid, '&signcolumn')) + call popup_close(winid) bwipe! set signcolumn& *** ../vim-8.2.1302/src/version.c 2020-07-26 18:33:05.873028774 +0200 --- src/version.c 2020-07-26 22:11:55.482025918 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1303, /**/ -- From "know your smileys": |-P Reaction to unusually ugly C code /// 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 ///