mirror of
https://github.com/microsoft/terminal.git
synced 2026-07-08 18:16:28 +00:00
Fix pattern coordinates to be viewport relative (#15892)
Pattern tree coordinates are viewport-relative. Closes #15891 ## Validation Steps Performed * Print some text so the viewport scrolls down * Print a URL * URL is underlined on hover ✅
This commit is contained in:
@@ -1432,7 +1432,9 @@ PointTree Terminal::_getPatterns(til::CoordType beg, til::CoordType end) const
|
||||
do
|
||||
{
|
||||
auto range = ICU::BufferRangeFromMatch(&text, re.get());
|
||||
// PointTree uses half-open ranges.
|
||||
// PointTree uses half-open ranges and viewport-relative coordinates.
|
||||
range.start.y -= beg;
|
||||
range.end.y -= beg;
|
||||
range.end.x++;
|
||||
intervals.push_back(PointTree::interval(range.start, range.end, 0));
|
||||
} while (uregex_findNext(re.get(), &status));
|
||||
|
||||
Reference in New Issue
Block a user