Patch 8.2.0359
Problem: popup_atcursor() may hang. (Yasuhiro Matsumoto)
Solution: Take the decoration into account. (closes #5728)
Files: src/popupwin.c, src/testdir/test_popupwin.vim
*** ../vim-8.2.0358/src/popupwin.c 2020-02-28 22:51:51.107937519 +0100
--- src/popupwin.c 2020-03-06 21:37:29.983647535 +0100
***************
*** 1232,1239 ****
|| wp->w_popup_pos == POPPOS_BOTLEFT))
{
wp->w_wincol = wantcol - 1;
! if (wp->w_wincol >= Columns - 1)
! wp->w_wincol = Columns - 1;
}
}
--- 1232,1240 ----
|| wp->w_popup_pos == POPPOS_BOTLEFT))
{
wp->w_wincol = wantcol - 1;
! // Need to see at least one character after the decoration.
! if (wp->w_wincol > Columns - left_extra - 1)
! wp->w_wincol = Columns - left_extra - 1;
}
}
*** ../vim-8.2.0358/src/testdir/test_popupwin.vim 2020-03-04 23:21:32.273078877 +0100
--- src/testdir/test_popupwin.vim 2020-03-06 21:35:02.676174611 +0100
***************
*** 3293,3296 ****
--- 3293,3309 ----
unlet g:bytes
endfunc
+ func Test_popupwin_atcursor_far_right()
+ new
+
+ " this was getting stuck
+ set signcolumn=yes
+ call setline(1, repeat('=', &columns))
+ normal! ggg$
+ call popup_atcursor(repeat('x', 500), #{moved: 'any', border: []})
+
+ bwipe!
+ set signcolumn&
+ endfunc
+
" vim: shiftwidth=2 sts=2
*** ../vim-8.2.0358/src/version.c 2020-03-06 20:35:46.120669845 +0100
--- src/version.c 2020-03-06 21:37:58.607526715 +0100
***************
*** 740,741 ****
--- 740,743 ----
{ /* Add new patch number below this line */
+ /**/
+ 359,
/**/
--
hundred-and-one symptoms of being an internet addict:
180. You maintain more than six e-mail addresses.
/// Bram Moolenaar -- Br...@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 ///