Closed martindisch closed 5 months ago
It most likely is a Windows-specific problem since I never came across this in all the Linux terminals that I tested minus on. Anyways Merging this. I will drop a patch release for this later this week.
Thank you for the quick turnaround, much appreciated.
While using Jujutsu on Windows 10/11 in PowerShell, I discovered a bug that's very easy to fix. Whenever I enter the pager (for example with
jj log
) for the second time in a row, it fails to properly repaint. That's because the order of operations interm::cleanup
is not exactly the inverse ofterm::setup
. The problem is that theEnableMouseCapture
command in crossterm stores the current mode andDisableMouseCapture
restores it, so in effect it used to restore raw mode (which was enabled before enabling mouse capture) during cleanup after having disabled it.I only observed this behavior in PowerShell so far, not
cmd.exe
. Maybe only PowerShell respects these accidentally mixed up mode settings between invocations whilecmd.exe
restores the original mode somehow.