Fix XTerm.NET build warnings#7
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR targets two build warnings in XTerm.NET by removing an unused parser event and ensuring OSC 8 hyperlink handling actually raises the Terminal.HyperlinkChanged event.
Changes:
- Remove the unused
EscapeSequenceParser.Dcsevent. - Add an internal
Terminal.RaiseHyperlinkChanged(...)helper and invoke it from OSC 8 hyperlink start/clear handling. - Update
HyperlinkEventArgs.Urlnullability and extend OSC hyperlink tests to validate event behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/XTerm.NET/Terminal.cs | Adds RaiseHyperlinkChanged(string?) to centralize raising the hyperlink event. |
| src/XTerm.NET/Parser/EscapeSequenceParser.cs | Removes the unused public Dcs event that was never raised. |
| src/XTerm.NET/InputHandler.cs | Raises hyperlink-changed notifications when OSC 8 links start and when they are cleared. |
| src/XTerm.NET/Events/TerminalEvents.cs | Updates HyperlinkEventArgs.Url to nullable and adjusts constructor accordingly. |
| src/XTerm.NET.Tests/OscSequenceTests.cs | Adds assertions that HyperlinkChanged fires for start and clear cases. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tomlm
approved these changes
Jun 21, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This fixes the two current XTerm.NET build warnings:
EscapeSequenceParser.Dcsevent, since DCS sequences are currently consumed by the parser state machine but not emitted to subscribersTerminal.HyperlinkChangeda real raised event from OSC 8 hyperlink handlingThe hyperlink event now fires when a hyperlink starts and when it is cleared. The event args URL is nullable so the clear event can report
null, matchingTerminal.CurrentHyperlink.Validation
dotnet build src\XTerm.NET.slnx -c Releasedotnet test src\XTerm.NET.slnx