Skip to content

Default ted untitled buffers to Plain Text instead of C##131

Merged
tig merged 3 commits into
developfrom
copilot/fix-default-file-type
May 15, 2026
Merged

Default ted untitled buffers to Plain Text instead of C##131
tig merged 3 commits into
developfrom
copilot/fix-default-file-type

Conversation

Copilot AI commented May 15, 2026

Copy link
Copy Markdown
Contributor

ted started new/untitled buffers with C# highlighting even when no file type was known. This changes the default to plain text while preserving extension-based highlighting when a path is available.

  • Default highlighting

    • Remove the constructor-time C# highlighting assignment from TedApp.
    • Initialize the language status item as Plain Text for untitled buffers.
  • Auto-detection remains unchanged

    • Keep SetDocument as the source of truth for file-extension-based highlighting.
    • Opening or binding a document with an extension still selects the matching syntax definition.
  • Integration coverage

    • Add coverage for the untitled-buffer default (Plain Text / no highlighting).
    • Update highlighting detection coverage to assert the normal path-based behavior through AppFixture<TedApp>.
Editor = new Editor
{
    GutterOptions = GutterOptions.LineNumbers | GutterOptions.Folding,
    ConvertTabsToSpaces = true,
    ReadOnly = readOnly,
    ViewportSettings = ViewportSettingsFlags.HasScrollBars
};

LanguageShortcut = new Shortcut (Key.Empty, "Plain Text", null)
{
    MouseHighlightStates = MouseState.None
};

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.jetbrains.com
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/.nuget/packages/jetbrains.resharper.globaltools/2026.1.1/tools/net8.0/any/cleanupcode.unix.runtimeconfig.json /home/REDACTED/.nuget/packages/jetbrains.resharper.globaltools/2026.1.1/tools/net8.0/any/cleanupcode.exe Terminal.Gui.Editor.slnx --profile=TG.Editor Full Cleanup (dns block)
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/.nuget/packages/jetbrains.resharper.globaltools/2026.1.1/tools/net8.0/any/cleanupcode.unix.runtimeconfig.json /home/REDACTED/.nuget/packages/jetbrains.resharper.globaltools/2026.1.1/tools/net8.0/any/cleanupcode.exe Terminal.Gui.Editor.slnx --profile=TG.Editor Full Cleanup --no-build --exclude=third_party/**/* (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI assigned Copilot and tig May 15, 2026
Copilot AI linked an issue May 15, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix default file type for TED to use .txt Default ted untitled buffers to Plain Text instead of C# May 15, 2026
Copilot AI requested a review from tig May 15, 2026 17:00
Copilot finished work on behalf of tig May 15, 2026 17:00
@tig
tig marked this pull request as ready for review May 15, 2026 17:08
@tig
tig merged commit 7356b96 into develop May 15, 2026
8 checks passed
@tig
tig deleted the copilot/fix-default-file-type branch May 15, 2026 17:29
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.

Default file type for ted is C# - that's not right

2 participants