From be0ffc2606706dd937f177a8fffe04fb56c969bb Mon Sep 17 00:00:00 2001 From: BDisp Date: Thu, 26 Aug 2021 15:39:37 +0100 Subject: [PATCH] Fixes #1438. Backspace not redrawing screen under some situations. (#1441) --- Terminal.Gui/Views/TextView.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Terminal.Gui/Views/TextView.cs b/Terminal.Gui/Views/TextView.cs index 6f4feaa48..bdeee6d6e 100644 --- a/Terminal.Gui/Views/TextView.cs +++ b/Terminal.Gui/Views/TextView.cs @@ -1822,7 +1822,7 @@ namespace Terminal.Gui { /// Text to add public void InsertText (string toAdd) { - foreach(var ch in toAdd) { + foreach (var ch in toAdd) { Key key; @@ -1830,14 +1830,14 @@ namespace Terminal.Gui { key = (Key)ch; } catch (Exception) { - throw new ArgumentException($"Cannot insert character '{ch}' because it does not map to a Key"); + throw new ArgumentException ($"Cannot insert character '{ch}' because it does not map to a Key"); } - + InsertText (new KeyEvent () { Key = key }); } } - + void Insert (Rune rune) { var line = GetCurrentLine (); @@ -1984,6 +1984,7 @@ namespace Terminal.Gui { } else if (dSize.size + RightOffset < Frame.Width + offB.width && tSize.size + RightOffset < Frame.Width + offB.width) { leftColumn = 0; + need = true; } if (currentRow < topRow) { @@ -2686,7 +2687,7 @@ namespace Terminal.Gui { } else { currentColumn = prevCount; } - Adjust (); + SetNeedsDisplay (); } return false;