Skip to content

Fix XTerm.NET build warnings#7

Merged
tomlm merged 3 commits into
tomlm:mainfrom
jchristn:fix/build-warnings
Jun 21, 2026
Merged

Fix XTerm.NET build warnings#7
tomlm merged 3 commits into
tomlm:mainfrom
jchristn:fix/build-warnings

Conversation

@jchristn

@jchristn jchristn commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

This fixes the two current XTerm.NET build warnings:

  • removes the unused EscapeSequenceParser.Dcs event, since DCS sequences are currently consumed by the parser state machine but not emitted to subscribers
  • makes Terminal.HyperlinkChanged a real raised event from OSC 8 hyperlink handling

The 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, matching Terminal.CurrentHyperlink.

Validation

  • dotnet build src\XTerm.NET.slnx -c Release
    • 0 warnings, 0 errors
  • dotnet test src\XTerm.NET.slnx
    • 584 passed, 0 failed

@jchristn jchristn marked this pull request as ready for review June 1, 2026 23:17
@tomlm tomlm requested a review from Copilot June 21, 2026 04:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.Dcs event.
  • Add an internal Terminal.RaiseHyperlinkChanged(...) helper and invoke it from OSC 8 hyperlink start/clear handling.
  • Update HyperlinkEventArgs.Url nullability 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.

Comment thread src/XTerm.NET/Parser/EscapeSequenceParser.cs
Comment thread src/XTerm.NET/Events/TerminalEvents.cs Outdated
Comment thread src/XTerm.NET/Events/TerminalEvents.cs Outdated
@tomlm tomlm merged commit 29d50e7 into tomlm:main Jun 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants