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

Ctrl-d/Ctrl-u to scroll the option's documentation on auto-complete #4364

Closed
wants to merge 5 commits into from

Conversation

Manosmer
Copy link
Contributor

@Manosmer Manosmer commented Oct 19, 2022

Fixes #3062. The Markdown documentation is now treated as a separate Box<Popup<Markdown>>. So, a Completion object now has 2 Popups; one for the Menu(as before) and a new one for the relevant option's documentation. Currently, the code creates a new Box<Popup<Markdown>> only when the user moves to another option.

Let me know if there is any additional optimisation needed, like:

  • running Popup::required_size() inside Completion::render() only when the option changes (currently, it runs every time scroll happens).

@the-mikedavis the-mikedavis added A-helix-term Area: Helix term improvements S-waiting-on-review Status: Awaiting review from a maintainer. labels Oct 19, 2022
@David-Else
Copy link
Contributor

I imagine the same scroll keys should be used as for scrolling in #4189

@Manosmer
Copy link
Contributor Author

I imagine the same scroll keys should be used as for scrolling in #4189

Currently, documentation scrolling in popups that appear by doing <Esc><Space>k is possible via Ctrl-d/Ctrl-u. I chose the same keybindings to comply with the above.

@David-Else
Copy link
Contributor

This is probably another PR, but it would be great if markdown previews of documentation could show if there was more to scroll up or down to.

At the moment, when you see the docs in a popup you don't know if you are seeing the whole thing or need to scroll down to read more. If there were a symbol like in the bottom right that showed when there was more it would be very useful. There could be an too that does the same thing in reverse.

@the-mikedavis
Copy link
Member

Yeah some sort of hint for how much documentation would be a nice feature (though separate from this PR) #1248. Maybe a scrollbar is sufficient

@Manosmer
Copy link
Contributor Author

@David-Else @the-mikedavis I could try to copy the menu scroll bar mechanism into the Popup and see how far I can go.

@Manosmer Manosmer mentioned this pull request Oct 24, 2022
@RmStorm
Copy link

RmStorm commented Aug 3, 2023

Is there any chance of getting this fix merged? Scrolling inside the auto-complete popup is still broken I think.

@pascalkuthe
Copy link
Member

closing this one as stale, #8047 is a newer implementation. Thank you for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ctrl-d ctrl-u not scrolling popup documentation
5 participants