-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for tabbing to embedded hyperlinks (#18347)
## Summary of the Pull Request There's already logic to tab to a hyperlink when we're in mark mode. We do this by looking at the automatically detected hyperlinks and finding the next one of interest. This adds an extra step afterwards to find any embedded hyperlinks and tab to them too. Since embedded hyperlinks are stored as text attributes, we need to iterate through the buffer to find the hyperlink and it's buffer boundaries. This PR tries to reduce the workload of that by first finding the automatically detected hyperlinks (since that's a fairly quick process), then using the reduced search area to find the embedded hyperlink (if one exists). ## Validation Steps Performed In PowerShell, add an embedded hyperlink as such: ```powershell ${ESC}=[char]27 Write-Host "${ESC}]8;;https://github.com/microsoft/terminal${ESC}\This is a link!${ESC}]8;;${ESC}\" ``` Enter mark mode (ctrl+shift+m) then shift+tab to it. ✅ The "This is a link!" is selected ✅ Verified that this works when searching forwards and backwards Closes #18310 Closes #15194 Follow-up from #13405 OSC 8 support added in #7251
- Loading branch information
1 parent
62e7f4b
commit 35bd607
Showing
1 changed file
with
82 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters