Skip to content

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

Open

Description

@firai

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!

Activity

  1. nightwing commented on Sep 4, 2024

    @nightwing
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions