micro-editor / micro-editor/micro
MoveLinesUp doesn't scroll the view to follow the selection when it moves above the viewport
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 29.6k
- Forks
- 1.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 10
Description
Description
When moving a multi-line selection up with MoveLinesUp (Alt+↑), the selected lines move correctly but the view does not scroll to follow them once the block moves above the top of the viewport - the moved text disappears off the top of the screen.
MoveLinesDown (Alt+↓) does not have this problem: the view scrolls to keep the block visible as it moves past the bottom edge.
Steps to reproduce
- Open a file longer than the terminal height.
- Scroll so the cursor/selection is near the top of the viewport.
- Select several lines (e.g. Shift+↓).
- Hold Alt+↑ to move the block upward past the top of the view.
Environment
- Version: 2.0.15
- OS: ArchLinux 7.0.14
- Terminal: native linux terminal (no GUI)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the MoveLinesUp and MoveLinesDown command implementations and compare how each handles viewport scrolling after moving a selection. Reproduce the issue with a multi-line selection near the top of a terminal-sized view, then verify that MoveLinesUp keeps the moved block visible as it crosses the top edge, matching MoveLinesDown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100