-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Screen content does not update in tmux #5104
Comments
OK I've managed to reproduce this. I think it's a bug that's been there a while and was just hidden by the fact that the previous invalidation-mechanism would coalesce both invalid regions into repainting the entire display. I need to figure out how to dispatch the appropriate content scrolling from the PTY to the Terminal because the entire point of the |
@skyline75489 while you've got a local build, would you mind trying out #5122? It's the speculative fix 😄 |
@DHowett-MSFT It's working! Vim is back to normal with the help of #5122. |
I can also confirm, working fine with the fix. |
Correct scrolling invalidation region for tmux in pty w/ bitmap Add tracing for circling and scrolling operations. Fix improper invalidation within AdjustCursorPosition routine in the subsection about scrolling down at the bottom with a set of margins enabled. ## References - Introduced with #5024 ## Detailed Description of the Pull Request / Additional comments - This occurs when there is a scroll region restriction applied and a newline operation is performed to attempt to spin the contents of just the scroll region. This is a frequent behavior of tmux. - Right now, the Terminal doesn't support any sort of "scroll content" operation, so what happens here generally speaking is that the PTY in the ConHost will repaint everything when this happens. - The PTY when doing `AdjustCursorPosition` with a scroll region restriction would do the following things: 1. Slide literally everything in the direction it needed to go to take advantage of rotating the circular buffer. (This would force a repaint in PTY as the PTY always forces repaint when the buffer circles.) 2. Copy the lines that weren't supposed to move back to where they were supposed to go. 3. Backfill the "revealed" region that encompasses what was supposed to be the newline. - The invalidations for the three operations above were: 1. Invalidate the number of rows of the delta at the top of the buffer (this part was wrong) 2. Invalidate the lines that got copied back into position (probably unnecessary, but OK) 3. Invalidate the revealed/filled-with-spaces line (this is good). - When we were using a simple single rectangle for invalidation, the union of the top row of the buffer from 1 and the bottom row of the buffer from 2 (and 3 was irrelevant as it was already unioned it) resulted in repainting the entire buffer and all was good. - When we switched to a bitmap, it dutifully only repainted the top line and the bottom two lines as the middle ones weren't a consequence of intersect. - The logic was wrong. We shouldn't be invalidating rows-from-the-top for the amount of the delta. The 1 part should be invalidating everything BUT the lines that were invalidated in parts 2 and 3. (Arguably part 2 shouldn't be happening at all, but I'm not optimizing for that right now.) - So this solves it by restoring an entire screen repaint for this sort of slide data operation by giving the correct number of invalidated lines to the bitmap. ## Validation Steps Performed - Manual validation with the steps described in #5104 - Automatic test `ConptyRoundtripTests::ScrollWithMargins`. Closes #5104
🎉This issue was addressed in #5122, which has now been successfully released as Handy links: |
Environment
Windows 10.0.18363.0
tmux over ssh in cygwin
Steps to reproduce
echo test
multiple timestest
, you should alternate with some different text to see if console is scrolled properly.Expected behavior
Whole screen buffer is redrawn
Actual behavior
Only first line in terminal is redrawn, the rest of the screen space is static and doesn't update while it should. If the output is one line (i.e without new line). If I do
echo 'test\n'
whole screen is properly redrawn.Bisect result
This is regression from this commit ca33d89 before that everything was working fine.
// CC @miniksa
The text was updated successfully, but these errors were encountered: