patch 8.2.1307: popup window width does not include number of sign columns
Problem: popup window width does not include number, fold of sign column
width.
Solution: Take number, fold and sign column with into account.
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index beb6870..00b956a 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -3375,12 +3375,22 @@
call sign_place(3, 'PopUpSelected', 'Other', winbufnr, {'lnum': 1})
" add sign to popup buffer, does not show
call sign_place(4, 'Selected', 'Current', winbufnr, {'lnum': 2})
+
+ func SetOptions()
+ call setwinvar(g:winid, '&number', 1)
+ call setwinvar(g:winid, '&foldcolumn', 2)
+ call popup_settext(g:winid, 'a longer line to check the width')
+ endfunc
END
call writefile(lines, 'XtestPopupSign')
let buf = RunVimInTerminal('-S XtestPopupSign', #{rows: 10})
call VerifyScreenDump(buf, 'Test_popupwin_sign_1', {})
+ " set more options to check the width is adjusted
+ call term_sendkeys(buf, ":call SetOptions()\<CR>")
+ call VerifyScreenDump(buf, 'Test_popupwin_sign_2', {})
+
call StopVimInTerminal(buf)
call delete('XtestPopupSign')
endfunc