microsoft / microsoft/terminal
Lines randomly disappear when switching between panes
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
# Environment
Main development branch
# Steps to reproduce
1. Enable FFM mode (not sure if required)
2. Open a Windows Powershell tab with two panes
3. In repro scenario, the panes contain a link (not sure if required)
3. Move the mouse from one pane to another
# Expected behavior
The panes get focus, the links get underlined / de-underlined.
# Actual behavior
Randomly some lines disappear from a pane and reappear after some hovering (see below)

My guess it is somehow related to us triggering redraw upon pointer move / exit.
Not sure if it is correlated but I also get a log of messages like this.
```
C:\Users\...\Documents\GitHub\terminal\src\renderer\base\renderer.cpp(185)\TerminalControl.dll!00007FFB299C87C1: (caller: 00007FFB298CD2CC) ReturnHr(15) tid(904) 80004004 Operation aborted
Msg:[C:\Users\vikhait\Documents\GitHub\terminal\src\inc\til\rectangle.h(839)\TerminalControl.dll!00007FFB29703A6B: (caller: 00007FFB298D0480) Exception(15) tid(904) 80004004 Operation aborted
[til::rectangle::operator struct _SMALL_RECT(!base::MakeCheckedNum(left()).AssignIfValid(&ret.Left))]
] [Microsoft::Console::Render::Renderer::_PaintFrameForEngine]
```
and this
```
C:\Users\...\Documents\GitHub\terminal\src\renderer\dx\DxRenderer.cpp(1468)\TerminalControl.dll!00007FFB298E2BA8: (caller: 00007FFB298CF273) LogHr(349) tid(904) 80070102 The wait operation timed out.
Msg:[Waiting for swap chain frame latency waitable object returned error or timeout.] [Microsoft::Console::Render::DxEngine::WaitUntilCanRender(ret)]
```
where the `WaitForSingleObjectEx` on `_swapChainFrameLatencyWaitableObject` within `DxEngine::WaitUntilCanRender()` gets `STATUS_TIMEOUT`.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two-pane PowerShell scenario while moving the pointer between panes, then inspect the redraw path in src/renderer/base/renderer.cpp. Review the rectangle conversion noted in src/inc/til/rectangle.h and the frame-latency handling in src/renderer/dx/DxRenderer.cpp, especially DxEngine::WaitUntilCanRender(). Done means pane lines no longer disappear during focus and link hover changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, powershell
- Domain
- computer-graphics, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100