micro-editor / micro-editor/micro
micro shows previous mangled text when scrolling up after resizing the terminal
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 29.6k
- Forks
- 1.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 10
Description
This is an issue I opened on the windows terminal repo. It sounds like it may be an issue with micro, and not the terminal. Please see issue and reply from DHowett here https://github.com/microsoft/terminal/issues/16409.
It looks like micro may not be using the "Xterm Alternate Screen Buffer" on Windows. It's fairly easy to reproduce, all it takes is resizing the terminal once and the previous buffer start showing up. See below for steps.
Windows Terminal version
1.18.3181.0
Windows build number
10.0.19045.3693
Specifications for micro & other editors
micro text editor 2.0.13 -- commit hash 68d88b57
nano for windows 7.2-22.1 -- https://github.com/okibcn/nano-for-windows
Steps to reproduce
Windows Terminal settings: Scrollbar visibility == Hidden, History size == 9001
Launch windows terminal, launch micro text editor. Write a few lines, resize terminal (larger->smaller or smaller->larger). Resizing unlocks ability to scroll up using keyboard bindings or using mouse select. Previous buffer shows with characters jumbled up / misaligned.
Same issue using windows terminal with nano editor.
Same issue using wezterm with both micro and nano.
Same issue using alacritty with both micro and nano.
Tested with nvim. No issue with nvim on all terminal emulators (cannot scroll back after resizing). This should be actual behavior for all editors.
Expected Behavior
Text should be redrawn normally and inability to scroll back should be maintained.
Actual Behavior
Resizing "unlocks" scrolling again, causing previous ghost text/buffers to show up. Particularly annoying when trying to drag-select with the mouse near the top of the file. Very confusing when seeing the previous buffers, especially when the text is all misaligned.
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
Reproduce the issue in micro 2.0.13 by resizing a terminal and then scrolling or mouse-selecting near the top of the file. Compare the behavior with nvim, which does not allow scrolling back after resizing, and review the linked Windows Terminal issue for context. Done means resizing no longer exposes misaligned previous buffers and the expected scrollback behavior is maintained.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100