mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
Textfield backspace remove char not working on wsl
This commit is contained in:
@@ -566,6 +566,7 @@ namespace Terminal.Gui {
|
||||
case Curses.KeyDeleteChar: return Key.DeleteChar;
|
||||
case Curses.KeyInsertChar: return Key.InsertChar;
|
||||
case Curses.KeyBackTab: return Key.BackTab;
|
||||
case Curses.KeyBackspace: return Key.Backspace;
|
||||
default: return Key.Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,6 +160,14 @@ namespace Terminal.Gui {
|
||||
{
|
||||
switch (kb.Key) {
|
||||
case Key.Delete:
|
||||
case Key.DeleteChar:
|
||||
if (text.Length == 0 || text.Length == point)
|
||||
return true;
|
||||
|
||||
SetText (text [0, point] + text [point + 1, null]);
|
||||
Adjust ();
|
||||
break;
|
||||
|
||||
case Key.Backspace:
|
||||
if (point == 0)
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user