Skip to content

Commit 8c75e41

Browse files
committed
Handle Key.Delete as Backspace, but Key.DeleteChar as the delete character
1 parent d17fb45 commit 8c75e41

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎Terminal.Gui/Views/TextField.cs‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,15 @@ void SetClipboard (ustring text)
159159
public override bool ProcessKey (KeyEvent kb)
160160
{
161161
switch (kb.Key) {
162-
case Key.Delete:
163-
#if false
164162
case Key.DeleteChar:
165163
if (text.Length == 0 || text.Length == point)
166164
return true;
167165

168166
SetText (text [0, point] + text [point + 1, null]);
169167
Adjust ();
170168
break;
171-
#endif
169+
170+
case Key.Delete:
172171
case Key.Backspace:
173172
if (point == 0)
174173
return true;

0 commit comments

Comments
 (0)