terminal icon indicating copy to clipboard operation
terminal copied to clipboard

Using Narrator on a newly opened tab hits an assert

Open carlos-zamora opened this issue 2 years ago • 0 comments

Windows Terminal version

main at 68cce101b

Windows build number

25267.1001

Other Software

No response

Steps to reproduce

  1. Turn on Narrator
  2. Open a debug build of Windows Terminal
  3. (if necessary) Click on Windows Terminal

Expected Behavior

No assert should occur

Actual Behavior

We're calling a Viewport::CompareInBounds({0,-20}, {0,8}, true). First line in there is IsInBounds({0,-20}, true).

Obviously, {0,-20} is out of bounds, so we IsInBounds() returns false and fails the assert.

Call stack:

 	Microsoft.Terminal.Control.dll!Microsoft::Console::Types::Viewport::CompareInBounds(const til::point first, const til::point second, bool allowEndExclusive) Line 372	C++
 	Microsoft.Terminal.Control.dll!Microsoft::Console::Types::UiaTextRangeBase::_expandToEnclosingUnit(TextUnit unit) Line 296	C++
 	Microsoft.Terminal.Control.dll!Microsoft::Console::Types::UiaTextRangeBase::ExpandToEnclosingUnit(TextUnit unit) Line 273	C++

If you're curious, we're apparently trying to expand by word.

carlos-zamora avatar Dec 13 '22 00:12 carlos-zamora