Patch 8.2.2470
Problem: Popup_getoptions() does not get textprop from other tab.
Solution: use win_valid_any_tab(). (closes #7786)
Files: src/popupwin.c, src/testdir/test_popupwin.vim
*** ../vim-8.2.2469/src/popupwin.c 2021-01-04 13:17:48.811309247 +0100
--- src/popupwin.c 2021-02-06 14:20:52.737256081 +0100
***************
*** 2983,2989 ****
dict_add_number(dict, "scrollbar", wp->w_want_scrollbar);
dict_add_number(dict, "zindex", wp->w_zindex);
dict_add_number(dict, "fixed", wp->w_popup_fixed);
! if (wp->w_popup_prop_type && win_valid(wp->w_popup_prop_win))
{
proptype_T *pt = text_prop_type_by_id(
wp->w_popup_prop_win->w_buffer,
--- 2983,2989 ----
dict_add_number(dict, "scrollbar", wp->w_want_scrollbar);
dict_add_number(dict, "zindex", wp->w_zindex);
dict_add_number(dict, "fixed", wp->w_popup_fixed);
! if (wp->w_popup_prop_type && win_valid_any_tab(wp->w_popup_prop_win))
{
proptype_T *pt = text_prop_type_by_id(
wp->w_popup_prop_win->w_buffer,
*** ../vim-8.2.2469/src/testdir/test_popupwin.vim 2021-01-04
13:17:48.811309247 +0100
--- src/testdir/test_popupwin.vim 2021-02-06 14:20:18.653359090 +0100
***************
*** 3803,3806 ****
--- 3803,3820 ----
call feedkeys("\<c-n>\<c-n>\<c-p>\<cr>", 'xt')
endfunc
+ func Test_popup_getoptions_other_tab()
+ new
+ call setline(1, 'some text')
+ call prop_type_add('textprop', {})
+ call prop_add(1, 1, #{type: 'textprop', length: 1})
+ let id = popup_create('TEST', #{textprop: 'textprop', highlight:
'ErrorMsg', tabpage: 1})
+ tab sp
+ call assert_equal(['textprop', 'textpropid', 'textpropwin'],
popup_getoptions(id)->keys()->filter({_, v -> v =~ 'textprop'}))
+
+ tabclose
+ bwipe!
+ call prop_type_delete('textprop')
+ endfunc
+
" vim: shiftwidth=2 sts=2
*** ../vim-8.2.2469/src/version.c 2021-02-06 12:58:13.627634852 +0100
--- src/version.c 2021-02-06 14:22:11.841015212 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2470,
/**/
--
** Hello and Welcome to the Psychiatric Hotline **
If you are obsessive-compulsive, please press 1 repeatedly.
If you are co-dependent, please ask someone to press 2.
If you have multiple personalities, please press 3, 4, 5 and 6.
If you are paranoid-delusional, we know who you are and what you want
- just stay on the line so we can trace the call.
If you are schizophrenic, listen carefully and a little voice will
tell you which number to press next.
If you are manic-depressive, it doesn't matter which number you press
- no one will answer.
If you suffer from panic attacks, push every button you can find.
If you are sane, please hold on - we have the rest of humanity on the
other line and they desparately want to ask you a few questions.
/// Bram Moolenaar -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202102061323.116DN6Fl2563697%40masaka.moolenaar.net.