Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popup window does not resize any longer after scrolling #14745

Open
lifepillar opened this issue May 10, 2024 · 0 comments
Open

Popup window does not resize any longer after scrolling #14745

lifepillar opened this issue May 10, 2024 · 0 comments
Labels

Comments

@lifepillar
Copy link
Contributor

Steps to reproduce

  1. Run vim --clean
  2. Source this script and take note of the reported popup id (let's say it's 1001):
vim9script

def Popup(): number
  return popup_create([], {
    border: [1, 1, 1, 1],
    close: 'click',
    minheight: 1,
    maxheight: 10,
    scrollbar: true,
    minwidth: &columns - 5,
    maxwidth: &columns - 5,
  })
enddef

var id = Popup()
echo id

popup_settext(id, repeat(['abcd'], 20))
  1. With the mouse, scroll down the popup. This step is crucial to reproduce the issue!
  2. Execute :call popup_settext(1001, []). The popup becomes empty and with minimum height.
  3. Execute :call popup_settext(1001, ['a', 'b', 'c'])

The height of the popup does not change at step 4.

Expected behaviour

I would expect the popup to resize at step 4 to fit the new content. That is what happens if scrolling (step 2) is skipped when performing the above.

Version of Vim

9.1.405

Environment

macOS 14.4.1
Apple Terminal
xterm-256color
ZSH 5.9

Logs and stack traces

No response

@lifepillar lifepillar added the bug label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant