terminal icon indicating copy to clipboard operation
terminal copied to clipboard

[WSL] Horizontal Scroll-bar displayed needlessly after resizing tmux session through SSH

Open munael opened this issue 5 years ago • 11 comments

Note

I was directed to post WSL console issues here (link redirects from microsoft/console to microsoft/terminal). See: https://github.com/microsoft/WSL/issues/new?assignees=&labels=&template=bug_report.md&title=

Environment

Windows build number: 1909
Windows Terminal version (if applicable): WSL latest. But not WSL 2.

Any other software? No.

Steps to reproduce

Happens often, but not reliably.

  1. ssh to a remote machine
  2. Start a tmux session
  3. Resize the terminal window several times. Print lines. Switch sessions/windows. clear screen, and repeat. Etc.
  4. At some point you'll see this: image Then it goes away only by restarting the terminal.

Expected behavior

  • Scroll bar is displayed only when needed by non-wrapping content.

Actual behavior

At some point you'll see this: image Then it goes away only by restarting the terminal.

munael avatar May 12 '20 19:05 munael

If you open the Properties page when you have a horizontal scrollbar, can you read out the Buffer and Screen size entries in the Layout tab?

DHowett-MSFT avatar May 13 '20 01:05 DHowett-MSFT

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

ghost avatar May 17 '20 04:05 ghost

@DHowett , They're the same:

This's quite inconsistent. I got it just now and will leave the session running. So if you have more questions/experiments I can get on that while we still have it in memory.

Possibly relevant: Today it manifested when I resized the window and quickly switched virtual desktops.

munael avatar May 18 '20 07:05 munael

Thanks for the info! I’ll be able to look at it when I get to work in ~8 hours.

Would you mind capturing a dump file of the conhost.exe for this window using task manager? You can email it to me at the address on my GitHub profile. That’ll make sure we don’t lose this state :smile:

DHowett avatar May 18 '20 08:05 DHowett

Shared :+1:

Sadly (luckily?) I resized once after the dump and it just happened to correct itself. So that came in just the right time. Either that, or the dumping somehow jolted something back into place.

munael avatar May 18 '20 11:05 munael

Thanks for the dumps! Triaged into Console Backlog @ P3. Terminal won't have this issue, as it doesn't have a horizontal scrollbar. :)

DHowett avatar May 18 '20 21:05 DHowett

Thank you for working on this! My tmux status bar is always hidden by the horizontal scroll bar, so I cannot use WSL shell maximized with tmux. It will be great when this is fixed! :) 👍

peschue avatar Sep 29 '20 09:09 peschue

@peschue Which ssh are you using? ssh.exe that ships with Windows? ssh from a WSL distro? Or some other ssh? And which version of ssh?

zadjii-msft avatar Sep 29 '20 13:09 zadjii-msft

Oh, actually I have this issue already when I open the WSL console and start tmux. No ssh necessary.

Open WSL console -> start tmux (configured with status bar) -> maximize window -> tmux status bar is covered by horizontal scroll bar. Maybe this is a separate issue then?

peschue avatar Oct 01 '20 08:10 peschue

Environment

Windows build number: Microsoft Windows [Version 10.0.19041.572]
Your Distribution version: Ubuntu 20.04 LTS
Whether the issue is on WSL 2 and/or WSL 1: Linux version 4.4.0-19041-Microsoft ([email protected])
(gcc version 5.4.0 (GCC) ) #488-Microsoft Mon Sep 01 13:43:00 PST 2020

Steps to reproduce

Open Ubuntu from task bar, snap Ubuntu/WSL to right side so it covers half of screen (issue seems less prevalent when snapped to left side, and it doesn't seem to matter if there is a window covering the other half or if it's clear to desktop). Open vim or emacs from the command line. Resize WSL window by dragging the center edge. Greyed out uninteractable horizontal scroll bar should appear and persist for the rest of the session, covering part of the displayed content in the window.

Expected behavior

Horizontal scroll bar appears and is interactable only when really needed (which seems like never in my experience) and does not cover content at bottom of window. If it does appear, it will disappear when it is no longer needed (window is fullscreened, etc.).

Actual behavior

Uninteractable\greyed out horizontal scrollbar appears and covers content at bottom of screen, even when no scrollbar is needed. Scrollbar persists even when window is resized or fullscreened. In general, this wouldn't but such a big deal, but it covers the Emacs minibuffer almost completely.

from #8340 (@ghbrown)

DHowett avatar Nov 20 '20 03:11 DHowett

Can confirm this issue remains with WSL2 under Windows 10 22H2 build 19045.5737.

willbicks avatar May 04 '25 19:05 willbicks