Skip to content
Merged
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
0b2703a
Merge branch 'develop' of tig:gui-cs/Terminal.Gui into develop
tig Apr 8, 2026
9431ed7
Merge branch 'develop' of tig:gui-cs/Terminal.Gui into develop
tig Apr 13, 2026
c6f991d
Merge branch 'develop' of tig:gui-cs/Terminal.Gui into develop
tig Apr 13, 2026
65ac5a1
Merge branch 'develop' of tig:gui-cs/Terminal.Gui into develop
tig Apr 13, 2026
7732fea
Merge branch 'develop' of tig:gui-cs/Terminal.Gui into develop
tig Apr 16, 2026
53d2077
Merge branch 'develop' of tig:gui-cs/Terminal.Gui into develop
tig Apr 17, 2026
fe4d638
Merge branch 'develop' of tig:gui-cs/Terminal.Gui into develop
tig May 5, 2026
531e149
Merge branch 'develop' of tig:gui-cs/Terminal.Gui into develop
tig May 5, 2026
d272f51
Merge branch 'develop' of tig:gui-cs/Terminal.Gui into develop
tig May 6, 2026
f64af09
Fixes #5434. Track adornment redraw deltas
harder Jun 1, 2026
61aaa71
Clean up adornment thickness-delta helpers
harder Jun 1, 2026
5c10380
Merge pull request #5467 from gui-cs/backmerge/v2.4.4
tig Jun 2, 2026
137f34d
Merge branch 'develop' of https://github.com/gui-cs/Terminal.Gui into…
tig Jun 2, 2026
34feed7
Bump TextMateSharp and TextMateSharp.Grammars
dependabot[bot] Jun 5, 2026
f35ccb3
Regenerate docfx Mandelbrot.gif with rendered sixel (#5471)
tig Jun 5, 2026
29176d6
Bump Spectre.Console from 0.55.2 to 0.56.0 (#5475)
dependabot[bot] Jun 8, 2026
2a12625
Merge pull request #5464 from harder/copilot/issue-5434-adornment-lay…
harder Jun 9, 2026
6d21554
Fixes #5360. Cull fully occluded overlapped opaque subviews during draw
harder Jun 9, 2026
21d875a
Address review: don't cull TransparentMouse candidates
harder Jun 9, 2026
d66794b
Fixes stale/contradictory AI agent instructions; adds agent docs lint…
tig Jun 10, 2026
d939953
Adds doc snippet compile validation; fixes v1 API rot in agent docs (…
tig Jun 10, 2026
a17572e
Merge branch 'develop' of https://github.com/gui-cs/Terminal.Gui into…
tig Jun 11, 2026
e9e24e5
Merge pull request #5477 from harder/fix-5360-cull-occluded-subviews
harder Jun 11, 2026
6ac8c77
Notify gui-cs/Editor on NuGet publish (#5483)
tig Jun 12, 2026
31a2f93
Merge branch 'develop' of https://github.com/gui-cs/Terminal.Gui into…
tig Jun 12, 2026
6f4a761
Fix publish.yml: secrets context is invalid in step if conditions
tig Jun 12, 2026
a45c89b
Bump Spectre.Console from 0.56.0 to 0.57.0 (#5484)
dependabot[bot] Jun 12, 2026
52d09ac
Fixes #5361. Cache Tabs logical order
harder Jun 12, 2026
4f0ac3e
Code formatting nits from code review
harder Jun 13, 2026
7ff26f3
Fixes #5474. Stop Progress scenario's threaded timer before app shutdown
harder Jun 13, 2026
e306ea6
Back-merge v2.4.6 from main into develop (#5486)
tig Jun 13, 2026
d0a7ddf
Merge pull request #5487 from harder/kh/5361-tabs-order-overhead
harder Jun 13, 2026
c5fa518
Merge branch 'develop' of tig:gui-cs/Terminal.Gui into develop
tig Jun 15, 2026
8130f52
Bump Markdig from 1.1.3 to 1.3.0
dependabot[bot] Jun 15, 2026
6505349
Fixes #5489. Add Kitty graphics protocol support alongside Sixel
tig Jun 15, 2026
93af6b6
Merge pull request #5491 from gui-cs/dependabot/nuget/Markdig-1.3.0
tig Jun 15, 2026
e0e1d4e
Fixes #5489. Fix Kitty/Sixel priority: Sixel preferred when both supp…
Copilot Jun 15, 2026
c860add
Fixes #5489. Switch to Kitty-first protocol priority; Sixel as fallba…
Copilot Jun 16, 2026
8fb3114
Fixes #5494. Update ImageView zoom keybindings to +/=/- and 0 (Mac-safe)
Copilot Jun 16, 2026
f489856
Address image protocol review feedback
tig Jun 16, 2026
134f413
Merge branch 'develop' of tig:gui-cs/Terminal.Gui into develop
tig Jun 16, 2026
3487f49
Merge branch 'tig/add-kitty-graphics-protocol-support' of tig:gui-cs/…
tig Jun 16, 2026
45b9999
Update Images scenario for raster graphics
tig Jun 16, 2026
e04fad9
Merge branch 'tig/add-kitty-graphics-protocol-support' of tig:gui-cs/…
tig Jun 16, 2026
14783e3
Fix raster protocol selection and fire repaint
tig Jun 16, 2026
8024d73
Merge branch 'tig/add-kitty-graphics-protocol-support' of tig:gui-cs/…
tig Jun 16, 2026
c32c2c0
Fix Kitty graphics cursor scroll and stale-placement on resize/removal
tig Jun 16, 2026
160e27c
Merge branch 'tig/add-kitty-graphics-protocol-support' of https://git…
tig Jun 16, 2026
d0fc2f5
Fix Kitty corruption when an image is split into multiple clip fragments
tig Jun 16, 2026
9ab81aa
Merge branch 'tig/add-kitty-graphics-protocol-support' of https://git…
tig Jun 16, 2026
f89875a
Fix Kitty resize border artifacts and Fire progress on Kitty-only ter…
tig Jun 16, 2026
035f84b
Merge branch 'tig/add-kitty-graphics-protocol-support' of https://git…
tig Jun 16, 2026
6783a1f
Defend Progress timer invoke during shutdown
harder Jun 16, 2026
67f1803
Fix raster output blank-cell composition
tig Jun 16, 2026
fd29eda
Merge branch 'tig/add-kitty-graphics-protocol-support' of tig:gui-cs/…
tig Jun 16, 2026
0bde74b
Merge pull request #5488 from harder/kh/5474-progress-esc-crash
harder Jun 16, 2026
fbf81d7
Bump JetBrains.Annotations from 2025.2.4 to 2026.2.0
dependabot[bot] Jun 17, 2026
676c9ec
Bump Markdig from 1.3.0 to 1.3.1
dependabot[bot] Jun 17, 2026
d551a1b
Merge pull request #5495 from gui-cs/dependabot/nuget/JetBrains.Annot…
tig Jun 17, 2026
d8607c0
Merge pull request #5496 from gui-cs/dependabot/nuget/Markdig-1.3.1
tig Jun 17, 2026
1af0ddb
code cleanup
tig Jun 18, 2026
cec051b
refactored scenario
tig Jun 18, 2026
04b73b4
Merge branch 'tig/add-kitty-graphics-protocol-support' of tig:gui-cs/…
tig Jun 18, 2026
b7ad0c3
infinate mandelbrot
tig Jun 18, 2026
a7fb6b1
Merge branch 'tig/add-kitty-graphics-protocol-support' of tig:gui-cs/…
tig Jun 18, 2026
cfe0115
infinte for realz
tig Jun 18, 2026
b54d078
Merge branch 'tig/add-kitty-graphics-protocol-support' of tig:gui-cs/…
tig Jun 18, 2026
ea59165
Address raster review feedback and docs
tig Jun 18, 2026
ea800db
Clean up Images scenario nullability
tig Jun 18, 2026
1734fd1
Merge branch 'tig/add-kitty-graphics-protocol-support' of tig:gui-cs/…
tig Jun 18, 2026
6a0b46c
Add JetBrains logo to README
tig Jun 18, 2026
4f21e45
Merge pull request #5497 from gui-cs/tig-patch-1
tig Jun 18, 2026
7fad484
Regenerate Mandelbrot.gif with animated zoom tour
tig Jun 18, 2026
a123fbe
Merge pull request #5493 from gui-cs/tig/add-kitty-graphics-protocol-…
tig Jun 19, 2026
df67f42
Merge branch 'develop' of tig:gui-cs/Terminal.Gui into develop
tig Jun 19, 2026
491fada
Bump Markdig from 1.3.1 to 1.3.2 (#5503)
dependabot[bot] Jun 19, 2026
e199bde
Fixes #5502 - Shadows now overlay raster ImageView (Sixel & Kitty)
tig Jun 19, 2026
3fb7734
Merge pull request #5506 from gui-cs/tig/fix-raster-shadow-overlay
tig Jun 19, 2026
48c21d4
Merge remote-tracking branch 'origin/main' into release/v2.4.7
tig Jun 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .aider.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Terminal.Gui v2 is a **complete rewrite**. Pre-2025 training data about Terminal
dotnet restore
dotnet build --no-restore
dotnet test --project Tests/UnitTestsParallelizable --no-build
dotnet test --project Tests/UnitTests --no-build
dotnet test --project Tests/UnitTests.NonParallelizable --no-build
```

---
Expand Down
2 changes: 1 addition & 1 deletion .claude/REFRESH.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
3. **Use `[...]`** not `new () { ... }` for collections
4. **SubView/SuperView** - never say "child", "parent", or "container"
5. **Unused lambda params** - use `_` discard: `(_, _) => { }`
6. **Local functions** - use camelCase: `void myLocalFunc ()`
6. **Local functions** - use PascalCase: `void MyLocalFunc ()`
7. **Backing fields** - place immediately before their property (ReSharper bug, must do manually)
8. **SPACE BEFORE PARENTHESES** - `Method ()` not `Method()`, `array [i]` not `array[i]` (see `formatting.md`)
9. **Braces on next line** - ALL opening braces on next line (Allman style)
Expand Down
172 changes: 90 additions & 82 deletions .claude/cookbook/common-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public sealed class FormWindow : Runnable<FormData?>
X = 1,
Y = 7,
Width = Dim.Fill (1),
ColorScheme = Colors.ColorSchemes ["Error"]
SchemeName = "Error"
};

Button submitButton = new ()
Expand Down Expand Up @@ -96,11 +96,13 @@ public record FormData (string Name, string Email, int Age);
A scrollable list with item selection and actions.

```csharp
using System.Collections.ObjectModel;

public sealed class ListWindow : Runnable
{
private readonly ListView _listView;
private readonly Label _detailLabel;
private readonly List<string> _items = ["Apple", "Banana", "Cherry", "Date", "Elderberry"];
private readonly ObservableCollection<string> _items = ["Apple", "Banana", "Cherry", "Date", "Elderberry"];

public ListWindow ()
{
Expand Down Expand Up @@ -131,21 +133,21 @@ public sealed class ListWindow : Runnable
Y = Pos.AnchorEnd (1)
};

_listView.SelectedItemChanged += (_, e) =>
// ListView is IValue<int?> — the selected index. SelectedItem is int?.
_listView.ValueChanged += (_, e) =>
{
if (e.Value >= 0 && e.Value < _items.Count)
if (e.NewValue is int index && index < _items.Count)
{
_detailLabel.Text = $"Selected: {_items [e.Value]}";
_detailLabel.Text = $"Selected: {_items [index]}";
}
};

selectButton.Accepting += (_, e) =>
selectButton.Accepted += (_, _) =>
{
if (_listView.SelectedItem >= 0)
if (_listView.SelectedItem is int selected)
{
MessageBox.Query (App!, "Selection", $"You selected: {_items [_listView.SelectedItem]}", "OK");
MessageBox.Query (App!, "Selection", $"You selected: {_items [selected]}", "OK");
}
e.Handled = true;
};

Add (_listView, _detailLabel, selectButton);
Expand All @@ -166,43 +168,33 @@ public sealed class MenuApp : Runnable
{
Title = "Menu Demo";

MenuBar menuBar = new ()
{
Menus =
[
new MenuBarItem (
"File",
[
new MenuItem ("New", "", () => NewFile (), null, null, KeyCode.N | KeyCode.CtrlMask),
new MenuItem ("Open...", "", () => OpenFile (), null, null, KeyCode.O | KeyCode.CtrlMask),
new MenuItem ("Save", "", () => SaveFile (), null, null, KeyCode.S | KeyCode.CtrlMask),
null, // Separator
new MenuItem ("Exit", "", () => App!.RequestStop (), null, null, KeyCode.Q | KeyCode.CtrlMask)
]),
new MenuBarItem (
"Edit",
[
new MenuItem ("Cut", "", null, null, null, KeyCode.X | KeyCode.CtrlMask),
new MenuItem ("Copy", "", null, null, null, KeyCode.C | KeyCode.CtrlMask),
new MenuItem ("Paste", "", null, null, null, KeyCode.V | KeyCode.CtrlMask)
]),
new MenuBarItem (
"Help",
[
new MenuItem ("About...", "", () => ShowAbout ())
])
]
};

TextView editor = new ()
MenuBar menuBar = new ();

menuBar.Add (new MenuBarItem ("_File",
[
new MenuItem { Title = "_New", Key = Key.N.WithCtrl, Action = NewFile },
new MenuItem { Title = "_Open...", Key = Key.O.WithCtrl, Action = OpenFile },
new MenuItem { Title = "_Save", Key = Key.S.WithCtrl, Action = SaveFile },
new Line (), // Separator
new MenuItem { Title = "_Quit", Key = Key.Q.WithCtrl, Action = () => App!.RequestStop () }
]));

menuBar.Add (new MenuBarItem ("_Help",
[
new MenuItem { Title = "_About...", Action = ShowAbout }
]));

// Main content area below the menu bar. (For a real multi-line editor,
// use gui-cs/Editor's EditorView — the core TextView is deprecated.)
View content = new ()
{
X = 0,
Y = 1,
Y = Pos.Bottom (menuBar),
Width = Dim.Fill (),
Height = Dim.Fill ()
};

Add (menuBar, editor);
Add (menuBar, content);
}

private void NewFile () => MessageBox.Query (App!, "New", "New file created", "OK");
Expand All @@ -216,7 +208,7 @@ public sealed class MenuApp : Runnable

## Split View Layout

Horizontal or vertical split layout with resizable panes.
Side-by-side panes positioned with `Pos`/`Dim`. (`TileView` does not exist in v2 — use plain views and `ViewArrangement` for user-resizable panes.)

```csharp
public sealed class SplitWindow : Runnable
Expand All @@ -225,27 +217,27 @@ public sealed class SplitWindow : Runnable
{
Title = "Split View Demo";

TileView tileView = new ()
FrameView leftPane = new ()
{
X = 0,
Y = 0,
Width = Dim.Fill (),
Title = "Left Pane",
Width = Dim.Percent (50),
Height = Dim.Fill (),
Orientation = Orientation.Vertical // or Horizontal
};

// Left pane
FrameView leftPane = new () { Title = "Left Pane" };
// Let the user resize this pane with mouse or keyboard (optional)
Arrangement = ViewArrangement.RightResizable
};
leftPane.Add (new Label { Text = "Left content", X = 1, Y = 1 });

// Right pane
FrameView rightPane = new () { Title = "Right Pane" };
FrameView rightPane = new ()
{
Title = "Right Pane",
X = Pos.Right (leftPane),
Width = Dim.Fill (),
Height = Dim.Fill ()
};
rightPane.Add (new Label { Text = "Right content", X = 1, Y = 1 });

tileView.Tiles.ElementAt (0).ContentView.Add (leftPane);
tileView.Tiles.ElementAt (1).ContentView.Add (rightPane);

Add (tileView);
Add (leftPane, rightPane);
}
}
```
Expand All @@ -254,7 +246,7 @@ public sealed class SplitWindow : Runnable

## Tab View

Tabbed interface with multiple content pages.
Tabbed interface with multiple content pages. (v1's `TabView` is now `Tabs`: each added `View` becomes a tab, and its `Title` is the tab label.)

```csharp
public sealed class TabbedWindow : Runnable
Expand All @@ -263,29 +255,25 @@ public sealed class TabbedWindow : Runnable
{
Title = "Tabbed Interface";

TabView tabView = new ()
{
X = 0,
Y = 0,
Width = Dim.Fill (),
Height = Dim.Fill ()
};
Tabs tabs = new ();

// Tab 1: Settings
View settingsTab = new ();
// Tab 1: Settings — Title becomes the tab label
View settingsTab = new () { Title = "Settings" };
settingsTab.Add (
new Label { Text = "Enable Feature:", X = 1, Y = 1 },
new CheckBox { X = 20, Y = 1, Text = "Enabled" }
);

// Tab 2: About
View aboutTab = new ();
View aboutTab = new () { Title = "About" };
aboutTab.Add (new Label { Text = "Version 1.0.0", X = 1, Y = 1 });

tabView.AddTab (new Tab { DisplayText = "Settings", View = settingsTab }, false);
tabView.AddTab (new Tab { DisplayText = "About", View = aboutTab }, false);
tabs.Add (settingsTab, aboutTab);

// Tabs is IValue<View?> — set Value to switch tabs programmatically
tabs.Value = settingsTab;

Add (tabView);
Add (tabs);
}
}
```
Expand Down Expand Up @@ -340,9 +328,14 @@ public sealed class ProgressWindow : Runnable
Add (_statusLabel, _progressBar, cancelButton);
}

public override void OnLoaded ()
protected override void OnIsRunningChanged (bool newIsRunning)
{
base.OnLoaded ();
base.OnIsRunningChanged (newIsRunning);

if (!newIsRunning)
{
return;
}

// Start simulated work
App!.AddTimeout (TimeSpan.FromMilliseconds (100), () =>
Expand Down Expand Up @@ -376,7 +369,7 @@ private void OpenFile ()
{
Title = "Open File",
AllowsMultipleSelection = false,
DirectoryPath = Environment.CurrentDirectory
Path = Environment.CurrentDirectory // Starting directory
};

// Optional: filter by extension
Expand All @@ -397,15 +390,15 @@ private void SaveFile ()
SaveDialog dialog = new ()
{
Title = "Save File",
DirectoryPath = Environment.CurrentDirectory,
FileName = "document.txt"
Path = Environment.CurrentDirectory // Starting directory
};

App!.Run (dialog);

// FileName is the name portion of the chosen Path (null if canceled)
if (!dialog.Canceled && !string.IsNullOrEmpty (dialog.FileName))
{
string path = dialog.FileName;
string path = dialog.Path;
// Save to path...
}
}
Expand Down Expand Up @@ -438,6 +431,8 @@ private void OpenMultipleFiles ()
Display tabular data with TableView.

```csharp
using System.Data;

public sealed class DataTableWindow : Runnable
{
public DataTableWindow ()
Expand Down Expand Up @@ -474,12 +469,21 @@ public sealed class DataTableWindow : Runnable
Text = "Select a row"
};

tableView.SelectedCellChanged += (_, e) =>
// TableView is IValue<TableSelection?> — ValueChanged fires when the selection moves.
// SelectedCell is a Point: X = column, Y = row.
tableView.ValueChanged += (_, e) =>
{
if (e.NewRow >= 0 && e.NewRow < table.Rows.Count)
if (e.NewValue is not { } selection)
{
return;
}

int row = selection.SelectedCell.Y;

if (row >= 0 && row < table.Rows.Count)
{
DataRow row = table.Rows [e.NewRow];
statusLabel.Text = $"Selected: {row ["Name"]} - ${row ["Price"]}";
DataRow dataRow = table.Rows [row];
statusLabel.Text = $"Selected: {dataRow ["Name"]} - ${dataRow ["Price"]}";
}
};

Expand All @@ -495,6 +499,8 @@ public sealed class DataTableWindow : Runnable
Hierarchical data display.

```csharp
using System.IO;

public sealed class TreeWindow : Runnable
{
public TreeWindow ()
Expand Down Expand Up @@ -568,7 +574,9 @@ public sealed class StatusBarApp : Runnable
{
Title = "Status Bar Demo";

TextView editor = new ()
// Main content area. (For a real multi-line editor, use gui-cs/Editor's
// EditorView — the core TextView is deprecated.)
View content = new ()
{
Width = Dim.Fill (),
Height = Dim.Fill (1) // Leave 1 row for StatusBar
Expand Down Expand Up @@ -604,7 +612,7 @@ public sealed class StatusBarApp : Runnable
};

statusBar.Add (saveShortcut, quitShortcut);
Add (editor, statusBar);
Add (content, statusBar);
}
}
```
Expand Down Expand Up @@ -652,7 +660,7 @@ if possible.

## Tips for All Patterns

1. **Always use `e.Handled = true`** in `Accepting` event handlers
1. **Use `-ed` events (`Accepted`) for side effects**; use `Accepting` + `e.Handled = true` only to inspect or cancel
2. **Use `Dim.Fill()` and `Pos.Center()`** instead of hardcoded values
3. **Call `App!.RequestStop()`** to close the current window
4. **Use `MessageBox.Query`** for simple dialogs
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading