Skip to content

Commit

Permalink
imp - Input should refresh itself
Browse files Browse the repository at this point in the history
---

The input should refresh itself when the resize is done. However, there is a bug that prevents it from working properly. We should be able to fix it on Terminaux 3.0.

---

Type: imp
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Feb 9, 2024
1 parent c251ca0 commit 9289385
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions public/Nitrocid/ConsoleBase/ConsoleResizeHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
using Nitrocid.Kernel.Events;
using Nitrocid.Misc.Screensaver;
using Terminaux.ResizeListener;
using Terminaux.Reader;

namespace Nitrocid.ConsoleBase
{
Expand Down Expand Up @@ -64,6 +65,10 @@ internal static void HandleResize(int oldX, int oldY, int newX, int newY)
// Also, tell the screensaver application to refresh itself
if (ScreensaverManager.InSaver)
ScreensaverDisplayer.displayingSaver.ScreensaverResizeSync();

// Also, tell the input reader to reset
if (TermReaderTools.Busy)
TermReaderTools.Refresh();
}
}
}

0 comments on commit 9289385

Please sign in to comment.