Skip to content

Cover Shift+Tab tab-reversal and fallback focus navigation when tab bindings are removed#136

Merged
tig merged 2 commits into
developfrom
copilot/fix-indent-functionality
May 16, 2026
Merged

Cover Shift+Tab tab-reversal and fallback focus navigation when tab bindings are removed#136
tig merged 2 commits into
developfrom
copilot/fix-indent-functionality

Conversation

Copilot AI commented May 15, 2026

Copy link
Copy Markdown
Contributor

This issue asks for two guarantees: Shift+Tab should undo a prior Tab indent (including block indent/unindent behavior), and removing Tab bindings should restore normal Terminal.Gui view navigation.
This PR adds targeted integration coverage for both behaviors.

  • Tab/Shift+Tab regression coverage

    • Added a direct regression test for Tab followed by Shift+Tab on the current line to ensure indent insertion is reversed cleanly.
    • Existing block indent/unindent tests remain in place and continue to validate multi-line behavior.
  • Keybinding-removal navigation coverage

    • Added focused integration tests that remove:
      • Key.Tab binding and assert focus advances to the next control.
      • Key.Tab.WithShift binding and assert focus moves to the previous control.
    • Introduced a minimal in-test host window with TextField -> Editor -> TextField to validate default View focus traversal when editor-specific bindings are absent.
  • Illustrative test shape

    fx.Top.Editor.KeyBindings.Remove (Key.Tab.WithShift);
    fx.Injector.InjectKey (Key.Tab.WithShift, Direct);
    
    Assert.True (fx.Top.Previous.HasFocus);

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 (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 Shift-Tab functionality for unindenting rows Cover Shift+Tab tab-reversal and fallback focus navigation when tab bindings are removed May 15, 2026
Copilot AI requested a review from tig May 15, 2026 20:01
Copilot finished work on behalf of tig May 15, 2026 20:01
@tig
tig marked this pull request as ready for review May 16, 2026 22:51
@tig
tig merged commit 935b569 into develop May 16, 2026
7 of 8 checks passed
@tig
tig deleted the copilot/fix-indent-functionality branch May 16, 2026 23:17
tig added a commit that referenced this pull request May 17, 2026
Reconciles develop's ted settings-UI port (#123) + indent fixes (#136)
with Phase 2's removal of Editor.UseThemeBackground. UseThemeBackground is
fully retired from the ted demo (the Editor knob is gone; theme decides bg):

- TedApp.cs: dropped the Editor init flag, the "Use Theme Background"
  checkbox + its View-menu item, and the SaveViewSettings write-back;
  re-applied the Phase 2 Theme status-bar shortcut on top of develop's
  restructured ctor.
- EditorSettings.cs: removed the UseThemeBackground persisted setting
  (property + ReadBool load + JSON serialize).
- TedApp.MarkdownPreview.cs: Markdown preview no longer seeds
  UseThemeBackground from the removed Editor property (TG default).
- Dropped the now-invalid Constructor_Defaults_UseThemeBackground_To_True
  test and the EditorSettings.UseThemeBackground reset.

Verified against a local TG #5313 pack: 0 warnings/0 errors,
Tests 439/439, IntegrationTests 190/190, dotnet format clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

Shift-Tab should in-indent

2 participants