Closed LemonBreezes closed 2 months ago
Hello @jcs090218, when you get a chance, can you please review this PR? This PR fixes the window width not being adjusted to the size of the longest imenu entry. Before, imenu entries would trail off past the edge of the window and now they no longer do that for me.
I don't know if this is a good design since there is a chance the imenu window will take up all the space. 🤔
I don't know if this is a good design since there is a chance the imenu window will take up all the space. 🤔
I mean, this only applies when the lsp-ui-imenu-window-width
is 0. Basically, what I am saying is that the current behavior for auto-resizing the window to the buffer does not work.
fit-window-to-buffer
does not actually use the longest line in the entire buffer. The documentation for it says: "The new width of WINDOW is calculated from the maximum length of its buffer's lines that follow the current start position of WINDOW." Somehow it doesn't work as intended for this case.
It makes sense, then. Thank you!
Previously, in buffers with many nested levels of imenu, the long lines would trail off past the width of the window. Now, we properly enlarge the window to fit the longest line.