[vim/vim] tFix popup (#5728)

25 views
Skip to first unread message

mattn

unread,
Mar 3, 2020, 8:57:10 AM3/3/20
to vim/vim, Subscribed
func! Test() abort
  call popup_atcursor(repeat('x', 500), {
  \ 'moved': 'any',
  \ 'border': [1, 1, 1, 1],
  \})
endfunc
call cursor([9, 78])
call Test()
"=======================================================================================

Please test this. Vim goes in endless loop since popup location does not be found.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/5728

Commit Summary

  • Fix popup

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Bram Moolenaar

unread,
Mar 5, 2020, 2:48:13 PM3/5/20
to vim/vim, Subscribed

I cannot reproduce the problem. How would "maxwidth" become zero or smaller?

mattn

unread,
Mar 5, 2020, 8:23:09 PM3/5/20
to vim/vim, Subscribed

I cannot reproduce the problem. How would "maxwidth" become zero or smaller?

Yes, it is. When the cursor is most right. The func above make endless loop.

Bram Moolenaar

unread,
Mar 5, 2020, 8:27:03 PM3/5/20
to vim...@googlegroups.com, mattn

> >I cannot reproduce the problem. How would "maxwidth" become zero or smaller?
>
> Yes, it is. When the cursor is most right. The func above make endless loop.

Please provide a script that, when edited and sourced, shows the
problem. I could not reproduce with the script you provided first.

--
If Microsoft would build a car...
... You'd have to press the "Start" button to turn the engine off.

/// 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 ///

mattn

unread,
Mar 6, 2020, 8:25:37 AM3/6/20
to vim/vim, Subscribed
func! Test() abort
  call popup_atcursor(repeat('x', 500), {
  \ 'moved': 'any',
  \ 'border': [1, 1, 1, 1],
  \})
endfunc
set signcolumn=yes
call setline(1, repeat('=', &columns))
normal! Gg$
call Test()

You can reproduce with this.

mattn

unread,
Mar 6, 2020, 8:25:50 AM3/6/20
to vim/vim, Subscribed
$ vim -Nu test.vim

Bram Moolenaar

unread,
Mar 6, 2020, 3:43:56 PM3/6/20
to vim/vim, Subscribed

Closed #5728 via ba2920f.

Bram Moolenaar

unread,
Mar 6, 2020, 3:44:25 PM3/6/20
to vim/vim, Subscribed

Yasuhiro Matsumoto wrote:

> ```

> func! Test() abort
> call popup_atcursor(repeat('x', 500), {
> \ 'moved': 'any',
> \ 'border': [1, 1, 1, 1],
> \})
> endfunc
> set signcolumn=yes
> call setline(1, repeat('=', &columns))
> normal! Gg$
> call Test()
> ```
>
> You can reproduce with this.

OK, it requires the cursor to be at the rightmost column of more.

I'll fix it, but there might be other corner cases. Let me know if you
find one.

--
hundred-and-one symptoms of being an internet addict:
179. You wonder why your household garbage can doesn't have an
"empty recycle bin" button.


/// 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 ///
Reply all
Reply to author
Forward
0 new messages