When I exit micro, all commands that I typed in cmd dissapear.
I olen my cmd and type cd, ls, pwd.. I enter micro and after exiting it clears the cmd screen
I'd like to second this. It doesn't seem to matter which shell you are using (Tested with bash, cmd and powershell, happens everywhere).
After micro is closed, the whole screen is cleared and all previously executed commands are no longer visible.
For me this is the number one thing that keeps me from using micro as my default editor.
This seems to depend on the terminal emulator used rather than the shell - I've only managed to reproduce it on windows. What OS/terminal emulator are you using? For reference, it works fine with konsole and in tmux (though they're linux/bsd-only afaik)
I'm using conhost and Windows Terminal on Windows 10. It is reproducible in those two, but I haven't tested any other terminal emulators
For me it's the same issue, I'm working on Windows 10, Windows Terminal and I call micro from Powershell.
Commenting to check if any progress in this issue? I am also facing the same issue on windows.
This is most certainly Windows specific. @JoeKar could you take a look?
Yep, I mentioned this here https://github.com/zyedidia/tcell/pull/26 already:
Still something is happening with the terminal style when micro is closed:
- The Windows Terminal prompt then still uses the background color of micro, till the screen is cleared.
- The previous history isn't available any longer.
Edit: Maybe it can be solved with gdamores' suggestion instead of mine:
This also uses the alternate screen buffer on Windows by default, with fixes to avoid clearing the non-alternate screen.
A backport of the newer variant is preferable anyway.
When will this get merged? I am facing the same issue with powershell and cmd on windows, but not bash in wsl. I am using windows terminal if that's relevant.
When will this get merged?
When we've the solution available and ready to be merged.
I am facing the same issue with powershell and cmd on windows, but not bash in wsl.
I suggest to use WSL as a current workaround.
I am using windows terminal if that's relevant.
Yes, that is the reason, which wasn't properly handled by micro's dependency tcell. With the upstream tcell it might already being fixed, but unfortunately we don't use the upstream tcell, but a modified fork instead.
One of the next big things done for micro will be the rework of the dependencies moved to (or forked again in) the micro-editor organization. If this will happen after the v2.0.15 or before isn't clear yet. But it is definitely needed to speedup the community driven maintenance & development of the overall project.
With this tcell we've already a much newer tcell version in the organization, but it still lacks the necessary commits, which need to be used. This should allow us to get closer to the upstream one, till it we maybe can use the upstream one in the future directly.
Long story short: The above mentioned step must be tested first to proof if the issue is solved then. As usual it needs some free time to do this.