Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
2d1ab6f
Fixes #4196. Application.Begin doesn't refresh the screen at start
BDisp Jul 21, 2025
a470275
Fixes #4198. Application.Invoke isn't wakeup the driver if idle
BDisp Jul 21, 2025
ef639c1
Reformatting to run CI again
BDisp Jul 21, 2025
d2acdf6
Revert "Reformatting to run CI again"
BDisp Jul 21, 2025
e48466f
Trying fix an issue where sometimes subview variable is null running …
BDisp Jul 21, 2025
0a52c49
Merge branch 'v2_4198_application-invoke-wakeup-fix' into v2_4200_wid…
BDisp Jul 21, 2025
fea1d4f
Replace ExtendedCharInfo.Char with char array
BDisp Jul 21, 2025
7097c0b
Replace IsWindowsTerminal with IsVirtualTerminal
BDisp Jul 22, 2025
8ef7116
Add a lastSize parameter to process resize automatically
BDisp Jul 22, 2025
1a2fb66
Handling surrogate pairs in input
BDisp Jul 22, 2025
9c25a7c
Implement SetConsoleTextAttribute
BDisp Jul 22, 2025
69e1986
Prevent select true color is not supported
BDisp Jul 22, 2025
600eba4
Fix null exception
BDisp Jul 22, 2025
0cc4c60
Revert GetWindowSize and add SetWindowSize
BDisp Jul 22, 2025
265c30e
Resolving merge conflicts
BDisp Jul 22, 2025
e061af0
Fix unit tests
BDisp Jul 22, 2025
15d4ac0
Revert all v2 changes except the one related with the ExtendedCharInfo
BDisp Jul 23, 2025
2f7b3c9
Revert newlines and FakeOutput
BDisp Jul 23, 2025
45d1710
Merge branch 'v2_develop' into v2_4200_wider-surrogatepair-force16col…
BDisp Jul 29, 2025
5be8d60
Prevents null reference
BDisp Jul 30, 2025
50cfa71
Add gnome-terminal to launch settings
BDisp Jul 30, 2025
88bf87b
Fixes issue on restore window size after maximize causing width shrin…
BDisp Jul 30, 2025
1ce2788
Add ; exec bash to stay in terminal
BDisp Jul 31, 2025
e5edad7
Fixes issue on restore window size after maximize causing width shrin…
BDisp Jul 31, 2025
8ead150
Tidying up input and output console modes
BDisp Jul 31, 2025
742ba26
Fixes uninitialized screen buffer.
BDisp Jul 31, 2025
3ad0859
Revert "Fixes issue on restore window size after maximize causing wid…
BDisp Aug 4, 2025
18d85e2
Merge branch 'v2_develop' into v2_4200_wider-surrogatepair-force16col…
BDisp Aug 4, 2025
3f5bdd2
Reset console after sending escape sequences
BDisp Aug 4, 2025
785a1ed
Remove unnecessary code only for buggy VSDebugConsole
BDisp Aug 4, 2025
30ff632
Fix more annoying exceptions
BDisp Aug 4, 2025
b0df97e
Ensure flush the input buffer before reset the console
BDisp Aug 4, 2025
104b8cf
Remove unnecessary ENABLE_VIRTUAL_TERMINAL_INPUT
BDisp Aug 20, 2025
9fbbf59
Remove unnecessary error handles
BDisp Aug 20, 2025
5f5e561
Resolving merge conflicts
BDisp Aug 31, 2025
3d640ee
Merge branch 'v2_develop' into v2_4200_wider-surrogatepair-force16col…
tig Sep 1, 2025
58b14f5
Merge branch 'v2_develop' into v2_4200_wider-surrogatepair-force16col…
tig Sep 10, 2025
e0e603d
Merge branch 'v2_develop' into v2_4200_wider-surrogatepair-force16col…
BDisp Sep 10, 2025
a1a7899
Fix CI warnings
BDisp Sep 10, 2025
35328d5
Fix more CI warnings
BDisp Sep 10, 2025
777b131
Fix more CI warnings
BDisp Sep 10, 2025
e4bae4e
Merge branch 'v2_develop' into v2_4200_wider-surrogatepair-force16col…
BDisp Sep 11, 2025
eb51243
Fixes #2796. CursesDriver doesn't render wide codepoints correctly
BDisp Sep 11, 2025
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
24 changes: 24 additions & 0 deletions Examples/UICatalog/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,30 @@
"commandLineArgs": "dotnet UICatalog.dll --driver v2net",
"distributionName": ""
},
"WSL-Gnome: UICatalog": {
"commandName": "Executable",
"executablePath": "wsl",
"commandLineArgs": "bash -c 'while [ ! -e \"$XDG_RUNTIME_DIR/bus\" ]; do sleep 0.1; done; gnome-terminal --wait -- bash -l -c \"dotnet UICatalog.dll; exec bash\"'",
"distributionName": ""
},
"WSL-Gnome: UICatalog --driver NetDriver": {
"commandName": "Executable",
"executablePath": "wsl",
"commandLineArgs": "bash -c 'while [ ! -e \"$XDG_RUNTIME_DIR/bus\" ]; do sleep 0.1; done; gnome-terminal --wait -- bash -l -c \"dotnet UICatalog.dll --driver NetDriver; exec bash\"'",
"distributionName": ""
},
"WSL-Gnome: UICatalog --driver v2": {
"commandName": "Executable",
"executablePath": "wsl",
"commandLineArgs": "bash -c 'while [ ! -e \"$XDG_RUNTIME_DIR/bus\" ]; do sleep 0.1; done; gnome-terminal --wait -- bash -l -c \"dotnet UICatalog.dll --driver v2; exec bash\"'",
"distributionName": ""
},
"WSL-Gnome: UICatalog --driver v2net": {
"commandName": "Executable",
"executablePath": "wsl",
"commandLineArgs": "bash -c 'while [ ! -e \"$XDG_RUNTIME_DIR/bus\" ]; do sleep 0.1; done; gnome-terminal --wait -- bash -l -c \"dotnet UICatalog.dll --driver v2net; exec bash\"'",
"distributionName": ""
},
"Benchmark All": {
"commandName": "Project",
"commandLineArgs": "--benchmark"
Expand Down
2 changes: 1 addition & 1 deletion Examples/UICatalog/Scenarios/NumericUpDownDemo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ void IncrementOnAccept (object? o, EventArgs eventArgs)
{
X = Pos.Center (),
Y = Pos.Bottom (_increment) + 1,
Increment = NumericUpDown<int>.TryConvert (1, out T? increment) ? increment : default,
Increment = NumericUpDown<int>.TryConvert (1, out T? increment) ? increment : default (T?),
};

_numericUpDown.ValueChanged += NumericUpDownOnValueChanged;
Expand Down
41 changes: 31 additions & 10 deletions Examples/UICatalog/UICatalogTop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,23 @@ View [] CreateThemeMenuItems ()
CheckedState = Application.Force16Colors ? CheckState.Checked : CheckState.UnChecked
};

_force16ColorsMenuItemCb.CheckedStateChanging += (sender, args) =>
{
if (Application.Force16Colors
&& args.Result == CheckState.UnChecked
&& !Application.Driver!.SupportsTrueColor)
{
args.Handled = true;
}
};

_force16ColorsMenuItemCb.CheckedStateChanged += (sender, args) =>
{
Application.Force16Colors = args.Value == CheckState.Checked;
{
Application.Force16Colors = args.Value == CheckState.Checked;

_force16ColorsShortcutCb!.CheckedState = args.Value;
Application.LayoutAndDraw ();
};
_force16ColorsShortcutCb!.CheckedState = args.Value;
Application.LayoutAndDraw ();
};

menuItems.Add (
new MenuItemv2
Expand Down Expand Up @@ -608,11 +618,22 @@ private StatusBar CreateStatusBar ()
};

_force16ColorsShortcutCb.CheckedStateChanging += (sender, args) =>
{
Application.Force16Colors = args.Result == CheckState.Checked;
_force16ColorsMenuItemCb!.CheckedState = args.Result;
Application.LayoutAndDraw ();
};
{
if (Application.Force16Colors
&& args.Result == CheckState.UnChecked
&& !Application.Driver!.SupportsTrueColor)
{
// If the driver does not support TrueColor, we cannot disable 16 colors
args.Handled = true;
}
};

_force16ColorsShortcutCb.CheckedStateChanged += (sender, args) =>
{
Application.Force16Colors = args.Value == CheckState.Checked;
_force16ColorsMenuItemCb!.CheckedState = args.Value;
Application.LayoutAndDraw ();
};

statusBar.Add (
_shQuit,
Expand Down
4 changes: 2 additions & 2 deletions Terminal.Gui/Drawing/Sixel/SixelSupportDetector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class SixelSupportDetector
public void Detect (Action<SixelSupportResult> resultCallback)
{
var result = new SixelSupportResult ();
result.SupportsTransparency = IsWindowsTerminal () || IsXtermWithTransparency ();
result.SupportsTransparency = IsVirtualTerminal () || IsXtermWithTransparency ();
IsSixelSupportedByDar (result, resultCallback);
}

Expand Down Expand Up @@ -142,7 +142,7 @@ private static void QueueRequest (AnsiEscapeSequence req, Action<string> respons

private static bool ResponseIndicatesSupport (string response) { return response.Split (';').Contains ("4"); }

private static bool IsWindowsTerminal ()
private static bool IsVirtualTerminal ()
{
return !string.IsNullOrWhiteSpace (Environment.GetEnvironmentVariable ("WT_SESSION"));

Expand Down
4 changes: 2 additions & 2 deletions Terminal.Gui/Drivers/ConsoleDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public void AddRune (Rune rune)
if (Contents [Row, Col - 1].Rune.GetColumns () > 1)
{
// Invalidate cell to left
Contents [Row, Col - 1].Rune = Rune.ReplacementChar;
Contents [Row, Col - 1].Rune = (Rune)'\0';
Contents [Row, Col - 1].IsDirty = true;
}
}
Expand Down Expand Up @@ -308,7 +308,7 @@ public void AddRune (Rune rune)
{
// Invalidate cell to right so that it doesn't get drawn
// TODO: Figure out if it is better to show a replacement character or ' '
Contents [Row, Col + 1].Rune = Rune.ReplacementChar;
Contents [Row, Col + 1].Rune = (Rune)'\0';
Contents [Row, Col + 1].IsDirty = true;
}
}
Expand Down
Loading
Loading