Ex prompt scrolls page when editor is taller than visible page

Open
#187 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
frontend

Research direction

Start by reproducing the ex prompt behavior in a CodeMirror editor whose height exceeds the visible page or container, comparing prompt entry and exit with a shorter editor. Investigate the ex prompt entry point and cursor focus or scrolling behavior; done means the prompt stays within the visible editor area or exiting it restores the cursor view.

Written by the indexing model from the issue text.

Description

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: https://github.com/jupyterlab-contrib/jupyterlab-vim/issues/144#issuecomment-2328362350. Thanks for your consideration!

Dominant language
JavaScript
Stars
470
Forks
53
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from replit/codemirror-vim

All issues in replit/codemirror-vim

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.