Skip to content

On Windows, exiting the program erases the scrollback buffer #3713

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

Open
garoto opened this issue Apr 4, 2025 · 3 comments
Open

On Windows, exiting the program erases the scrollback buffer #3713

garoto opened this issue Apr 4, 2025 · 3 comments

Comments

@garoto
Copy link

garoto commented Apr 4, 2025

Description of the problem or steps to reproduce

micro will erase the scrollback buffer upon exit.

Specifications

Commit hash: 9835676
OS: Windows 10 21H2
Terminal: WindowsTerminal.exe canary, openconsole.exe canary , cmd.exe 21h2 native.

This is a deal-braker to me. Anyway to make it stop doing it? Maybe a envvar? Or is this a tcell behavior?

@niten94
Copy link
Contributor

niten94 commented Apr 4, 2025

This is an issue that only occurs with the old fork of Tcell that Micro uses. It is reported in #1243 and #2038 so this could be closed as a duplicate, but other issues seem to be currently focused.

This issue has also bothered me when I use Micro on Windows. The only good thing I could say is that I have started thinking on how to update the fork, so that platform-specific fixes (not only on Windows) could be applied.

@garoto
Copy link
Author

garoto commented Apr 5, 2025

Nice, thanks for linking those issues. I searched for "scrollback", "scrollback buffer" but nothing relevant came up. Oh well.

While I was typing this, I think I managed to find a workaround: explicitly running the program in an alternate screen buffer and returning after:

C:\> busybox printf \x1b[?1049h & micro test.txt & busybox printf \x1b[?1049l

Goint to try and make a doskey macro with this CLI and see how it goes!

@JoeKar
Copy link
Collaborator

JoeKar commented Apr 5, 2025

The only good thing I could say is that I have started thinking on how to update the fork, so that platform-specific fixes (not only on Windows) could be applied.

The first foundation is build with the master branch of tcell in the micro-editor organization. Unfortunately a lot more changes done at the legacy branch must be ported to the much newer upstream code base, for which I wasn't able to spend the time yet.

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

3 participants