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

Ex prompt scrolls page when editor is taller than visible page #187

Open
firai opened this issue Sep 4, 2024 · 1 comment
Open

Ex prompt scrolls page when editor is taller than visible page #187

firai opened this issue Sep 4, 2024 · 1 comment

Comments

@firai
Copy link

firai commented Sep 4, 2024

When the CM editor is taller than the visible page/container height, opening the ex prompt puts the prompt at the bottom of the editor, and the page/container is scrolled to show the ex prompt. When the user exits the ex prompt, the page/container stays at the bottom of the editor unless a movement re-focuses the cursor.
Animation2

This is in contrast to a CM editor that's shorter than the visible page/container height, which does not scroll the editor to show the ex prompt.
Animation1

Is there a way to make the ex prompt appear at the bottom of the visible portion of the editor instead?

Alternatively, can the cursor be re-focused after exiting the ex prompt to scroll the page/container back up to the cursor?

This is sort of a niche use case, but unfortunately it's difficult for us to control the height of the CM editor to make sure the bottom of the CM editor is within the visible page. Ref: jupyterlab-contrib/jupyterlab-vim#144 (comment). Thanks for your consideration!

@nightwing
Copy link
Collaborator

How do you handle the built-in search and replace plugin, which seems to suffer from the same issue? We are using the editor panel functionality provided by codemirror so this may be a more general issue.

That said wouldn't it be better to display prompt at the bottom of notebook, with ability to search all cells instead of just one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants