Skip to content

Commit a6f03e4

Browse files
authored
Merge branch 'v2_develop' into sixel-encoder-tinkering
2 parents 8ddfd71 + 8f1954f commit a6f03e4

31 files changed

+1137
-723
lines changed

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ _ReSharper.**
3434
~$*
3535
*~
3636

37-
# NuGet Stuff
38-
*.nupkg
39-
*.snupkg
4037
# Exclude everything in packages directory except the packages/build directory
4138
**/[Pp]ackages/*
4239
!**/[Pp]ackages/build/
@@ -61,4 +58,3 @@ demo.*
6158
*.tui/
6259

6360
*.dotCover
64-
/local_packages/

NativeAot/PackTerminalGui.ps1

Lines changed: 0 additions & 9 deletions
This file was deleted.

NativeAot/PackTerminalGui.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

SelfContained/PackTerminalGui.ps1

Lines changed: 0 additions & 9 deletions
This file was deleted.

SelfContained/PackTerminalGui.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

Terminal.Gui/Application/Application.Run.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ public static RunState Begin (Toplevel toplevel)
8080
{
8181
ArgumentNullException.ThrowIfNull (toplevel);
8282

83-
#if DEBUG_IDISPOSABLE
84-
Debug.Assert (!toplevel.WasDisposed);
85-
86-
if (_cachedRunStateToplevel is { } && _cachedRunStateToplevel != toplevel)
87-
{
88-
Debug.Assert (_cachedRunStateToplevel.WasDisposed);
89-
}
90-
#endif
83+
//#if DEBUG_IDISPOSABLE
84+
// Debug.Assert (!toplevel.WasDisposed);
85+
86+
// if (_cachedRunStateToplevel is { } && _cachedRunStateToplevel != toplevel)
87+
// {
88+
// Debug.Assert (_cachedRunStateToplevel.WasDisposed);
89+
// }
90+
//#endif
9191

9292
// Ensure the mouse is ungrabbed.
9393
MouseGrabView = null;

Terminal.Gui/Application/ApplicationNavigation.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,19 @@ public ApplicationNavigation ()
2727
/// <summary>
2828
/// Gets the most focused <see cref="View"/> in the application, if there is one.
2929
/// </summary>
30-
public View? GetFocused () { return _focused; }
30+
public View? GetFocused ()
31+
{
32+
return _focused;
33+
34+
if (_focused is { CanFocus: true, HasFocus: true })
35+
{
36+
return _focused;
37+
}
38+
39+
_focused = null;
40+
41+
return null;
42+
}
3143

3244
/// <summary>
3345
/// Gets whether <paramref name="view"/> is in the Subview hierarchy of <paramref name="start"/>.
@@ -77,6 +89,7 @@ internal void SetFocused (View? value)
7789
{
7890
return;
7991
}
92+
Debug.Assert (value is null or { CanFocus: true, HasFocus: true });
8093

8194
_focused = value;
8295

Terminal.Gui/Drawing/Glyphs.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ public class GlyphDefinitions
9797
/// <summary>Dot. Default is (U+2219) - ∙.</summary>
9898
public Rune Dot { get; set; } = (Rune)'∙';
9999

100+
/// <summary>Dotted Square - ⬚ U+02b1a┝</summary>
101+
public Rune DottedSquare { get; set; } = (Rune)'⬚';
102+
100103
/// <summary>Black Circle . Default is (U+025cf) - ●.</summary>
101104
public Rune BlackCircle { get; set; } = (Rune)'●'; // Black Circle - ● U+025cf
102105

Terminal.Gui/Input/Command.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ public enum Command
166166
/// </summary>
167167
EnableOverwrite,
168168

169+
/// <summary>
170+
/// Inserts a character.
171+
/// </summary>
172+
Insert,
173+
169174
/// <summary>Disables overwrite mode (<see cref="EnableOverwrite"/>)</summary>
170175
DisableOverwrite,
171176

Terminal.Gui/Terminal.Gui.csproj

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<!-- =================================================================== -->
33
<!-- Version numbers -->
44
<!-- Automatically updated by gitversion (run `dotnet-gitversion /updateprojectfiles`) -->
@@ -142,4 +142,36 @@
142142
<Authors>Miguel de Icaza, Tig Kindel (@tig), @BDisp</Authors>
143143
</PropertyGroup>
144144
<ProjectExtensions><VisualStudio><UserProperties resources_4config_1json__JsonSchema="../../docfx/schemas/tui-config-schema.json" /></VisualStudio></ProjectExtensions>
145+
146+
<Target Name="CopyNuGetPackagesToLocalPackagesFolder"
147+
AfterTargets="Pack"
148+
Condition="'$(Configuration)' == 'Release'">
149+
<PropertyGroup>
150+
<!-- Define the path for local_packages relative to the project directory -->
151+
<LocalPackagesPath>$(MSBuildThisFileDirectory)..\local_packages\</LocalPackagesPath>
152+
<!-- Output path without framework-specific folders -->
153+
<PackageOutputPath>$(MSBuildThisFileDirectory)bin\$(Configuration)\</PackageOutputPath>
154+
</PropertyGroup>
155+
156+
<!-- Ensure the local_packages folder exists -->
157+
<Message Text="Checking if $(LocalPackagesPath) exists, creating if necessary." Importance="high" />
158+
<MakeDir Directories="$(LocalPackagesPath)" />
159+
160+
<!-- Collect .nupkg and .snupkg files into an item group -->
161+
<ItemGroup>
162+
<NuGetPackages Include="$(PackageOutputPath)*.nupkg;$(PackageOutputPath)*.snupkg" />
163+
</ItemGroup>
164+
165+
<!-- Check if any packages were found -->
166+
<Message Text="Found packages: @(NuGetPackages)" Importance="high" />
167+
168+
<!-- Copy files only if found -->
169+
<Copy SourceFiles="@(NuGetPackages)"
170+
DestinationFolder="$(LocalPackagesPath)"
171+
SkipUnchangedFiles="false"
172+
Condition="@(NuGetPackages) != ''" />
173+
174+
<!-- Log success -->
175+
<Message Text="Copy completed successfully." Importance="high" />
176+
</Target>
145177
</Project>

0 commit comments

Comments
 (0)