Skip to content

Commit 6d585f4

Browse files
committed
patch 8.2.1303: calling popup_setoptions() resets 'signcolumn'
Problem: Calling popup_setoptions() resets 'signcolumn'. Solution: Only set 'signcolumn' when creating the popup. (closes #6542)
1 parent 01865ad commit 6d585f4

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

src/popupwin.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,8 +740,6 @@ apply_general_options(win_T *wp, dict_T *dict)
740740
set_string_option_direct_in_win(wp, (char_u *)"wincolor", -1,
741741
str, OPT_FREE|OPT_LOCAL, 0);
742742

743-
set_string_option_direct_in_win(wp, (char_u *)"signcolumn", -1,
744-
(char_u *)"no", OPT_FREE|OPT_LOCAL, 0);
745743
set_padding_border(dict, wp->w_popup_padding, "padding", 999);
746744
set_padding_border(dict, wp->w_popup_border, "border", 1);
747745

@@ -946,6 +944,10 @@ apply_options(win_T *wp, dict_T *dict)
946944
int nr;
947945

948946
apply_move_options(wp, dict);
947+
948+
set_string_option_direct_in_win(wp, (char_u *)"signcolumn", -1,
949+
(char_u *)"no", OPT_FREE|OPT_LOCAL, 0);
950+
949951
apply_general_options(wp, dict);
950952

951953
nr = dict_get_number(dict, (char_u *)"hidden");

src/testdir/test_popupwin.vim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3115,6 +3115,11 @@ func Test_popupmenu_info_border()
31153115
call term_sendkeys(buf, "a\<C-X>\<C-U>")
31163116
call VerifyScreenDump(buf, 'Test_popupwin_infopopup_8', {})
31173117

3118+
call term_sendkeys(buf, " \<Esc>")
3119+
call term_sendkeys(buf, ":set completepopup+=width:10\<CR>")
3120+
call term_sendkeys(buf, "a\<C-X>\<C-U>")
3121+
call VerifyScreenDump(buf, 'Test_popupwin_infopopup_9', {})
3122+
31183123
call term_sendkeys(buf, "\<Esc>")
31193124
call StopVimInTerminal(buf)
31203125
call delete('XtestInfoPopup')
@@ -3436,6 +3441,11 @@ func Test_popupwin_atcursor_far_right()
34363441
normal! ggg$
34373442
let winid = popup_atcursor(repeat('x', 500), #{moved: 'any', border: []})
34383443

3444+
" 'signcolumn' was getting reset
3445+
call setwinvar(winid, '&signcolumn', 'yes')
3446+
call popup_setoptions(winid, {'zindex': 1000})
3447+
call assert_equal('yes', getwinvar(winid, '&signcolumn'))
3448+
34393449
call popup_close(winid)
34403450
bwipe!
34413451
set signcolumn&

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,8 @@ static char *(features[]) =
754754

755755
static int included_patches[] =
756756
{ /* Add new patch number below this line */
757+
/**/
758+
1303,
757759
/**/
758760
1302,
759761
/**/

0 commit comments

Comments
 (0)