Open
Conversation
Rename Editor.TabWidth → IndentationSize (R3). Add ConvertTabsToSpaces, ShowTabs properties. Add Tab/Shift+Tab key handlers: insert tab or spaces, block indent/unindent with single-undo-step (R5), nearest-edge mouse snap. Update ted demo with Indent Size control, Convert Tabs To Spaces toggle, and ShowTabs status-bar checkbox. Stopgap: ships without B1 (VisualLineBuilder pipeline). Tab rendering still operates inside OnDrawingContent's char-by-char loop (R1/R2 violation acknowledged). Interim helpers marked TODO(VisualLineBuilder) for deletion when B1 lands. Closes #42. Addresses #37. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Editor.TabWidth→IndentationSize— mirrors AvaloniaEdit'sTextEditorOptions.IndentationSize(R3 compliant)ConvertTabsToSpaces(bool, default false) — governs Tab key behavior, not document contentShowTabs(bool, default false) — renders→glyph at tab positionsB1 dependency — choice (c): stopgap, explicitly owned
The spec (§8 D1) says D1 depends on B1 (VisualLineBuilder pipeline) and without B1 "becomes another welded shortcut and is rejected." I chose to ship a working implementation and own the R1/R2 violation:
What violates R1/R2:
DrawLineContentstill operates char-by-char insideOnDrawingContentTabElementin a visual-line pipeline (B1 doesn't exist yet)What's clean:
// TODO(VisualLineBuilder)for deletion when B1 landsEditor.Commands.csRunUpdate()for single undo step (R5)Skipped
IIndentationStrategyplumbing — separate work item D7Test plan
dotnet run --project tests/Terminal.Gui.Text.Tests— 212 passeddotnet run --project tests/Terminal.Gui.Editor.Tests— 44 passeddotnet run --project tests/Terminal.Gui.Editor.IntegrationTests— 81 passeddotnet format --verify-no-changes— cleandotnet jb cleanupcode— no changes🤖 Generated with Claude Code