Skip to content

Feature: Close editor tab with Ctrl+W#212

Merged
hendrikmennen merged 3 commits intomainfrom
copilot/add-close-editor-tab-shortcut
Apr 22, 2026
Merged

Feature: Close editor tab with Ctrl+W#212
hendrikmennen merged 3 commits intomainfrom
copilot/add-close-editor-tab-shortcut

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 22, 2026

No keyboard shortcut existed to close the active editor tab, requiring manual click on the tab's "X" button.

Changes

  • src/OneWare.Core/App.axaml.cs: Registers a new "Close Tab" entry in the File menu bound to Ctrl+W, wired to CloseFileAsync on the current document (respects dirty-state save dialog). Menu item is disabled when no document is open.
windowService.RegisterMenuItem("MainWindow_MainMenu/File", new MenuItemModel("Close Tab")
{
    Command = new AsyncRelayCommand(
        () => { var dockService = Services.Resolve<IMainDockService>(); return dockService.CloseFileAsync(dockService.CurrentDocument!.FullPath); },
        () => Services.Resolve<IMainDockService>().CurrentDocument is not null),
    Header = "Close Tab",
    InputGesture = new KeyGesture(Key.W, PlatformHelper.ControlKey),
    Icon = new IconModel("VsImageLib.CloseDocumentGroup16X")
});

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:

  • av-build-tel-api-v1.avaloniaui.net
    • Triggering command: /usr/share/dotnet/dotnet dotnet exec --runtimeconfig /home/REDACTED/.nuget/packages/avalonia.buildservices/11.3.2/tools/netstandard2.0/runtimeconfig.json /home/REDACTED/.nuget/packages/avalonia.buildservices/11.3.2/tools/netstandard2.0/Avalonia.BuildServices.Collector.dll (dns block)

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

Agent-Logs-Url: https://github.com/one-ware/OneWare/sessions/1a104173-a1d9-4760-90bf-88963d964f72

Co-authored-by: hendrikmennen <25281882+hendrikmennen@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Ctrl+W shortcut to close editor tab Feature: Close editor tab with Ctrl+W Apr 22, 2026
Copilot AI requested a review from hendrikmennen April 22, 2026 13:11
@hendrikmennen hendrikmennen marked this pull request as ready for review April 22, 2026 13:15
@hendrikmennen hendrikmennen merged commit 0748b41 into main Apr 22, 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.

Feature: Close editor tab using Ctrl+W shortcut

2 participants