Skip to content

Commit

Permalink
Fixing an issue in Terminal.Gui which prevents the app from being ctr…
Browse files Browse the repository at this point in the history
…l+c after selecting apps.
  • Loading branch information
tpill90 committed Dec 18, 2023
1 parent c1b6923 commit 50e5c78
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions BattleNetPrefill/CliCommands/SelectAppsCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ public async ValueTask ExecuteAsync(IConsole console)
using var tui2 = new SelectAppsTui(tuiAppModels, showReleaseDate: false, showPlaytime: false);
Key userKeyPress = tui2.Run();

// There is an issue with Terminal.Gui where this property is set to 'true' when the TUI is initialized, but forgets to reset it back to 'false' when the TUI closes.
// This causes an issue where the prefill run is not able to be cancelled with ctrl+c, but only on Linux systems.
Console.TreatControlCAsInput = false;

// Will only allow for prefill if the user has saved changes. Escape simply exits
if (userKeyPress != Key.Enter)
{
Expand Down

0 comments on commit 50e5c78

Please sign in to comment.