]> granicus.if.org Git - vim/commitdiff
patch 8.2.1303: calling popup_setoptions() resets 'signcolumn' v8.2.1303
authorBram Moolenaar <Bram@vim.org>
Sun, 26 Jul 2020 20:20:54 +0000 (22:20 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 26 Jul 2020 20:20:54 +0000 (22:20 +0200)
Problem:    Calling popup_setoptions() resets 'signcolumn'.
Solution:   Only set 'signcolumn' when creating the popup. (closes #6542)

src/popupwin.c
src/testdir/test_popupwin.vim
src/version.c

index fc69c90d9d7cd794a15d3b5ca7a0468582a9e0fe..d2b7f22f0b91a1849e012e635b894b902a2b0d25 100644 (file)
@@ -740,8 +740,6 @@ apply_general_options(win_T *wp, dict_T *dict)
        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);
 
@@ -946,6 +944,10 @@ apply_options(win_T *wp, dict_T *dict)
     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");
index 054d479efd37ae9f07b318f3a224a854aed095d0..beb6870b6de43b7a9cefdb6071a06ccd2877ce81 100644 (file)
@@ -3115,6 +3115,11 @@ func Test_popupmenu_info_border()
   call term_sendkeys(buf, "a\<C-X>\<C-U>")
   call VerifyScreenDump(buf, 'Test_popupwin_infopopup_8', {})
 
+  call term_sendkeys(buf, " \<Esc>")
+  call term_sendkeys(buf, ":set completepopup+=width:10\<CR>")
+  call term_sendkeys(buf, "a\<C-X>\<C-U>")
+  call VerifyScreenDump(buf, 'Test_popupwin_infopopup_9', {})
+
   call term_sendkeys(buf, "\<Esc>")
   call StopVimInTerminal(buf)
   call delete('XtestInfoPopup')
@@ -3436,6 +3441,11 @@ func Test_popupwin_atcursor_far_right()
   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&
index e969ab0f3529f8451d36aa5822f4bbab323f11d9..73ab8c3998eb711cc50532f27c9df7b8f0a0b498 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1303,
 /**/
     1302,
 /**/