소스 검색

Handle Key.Delete as Backspace, but Key.DeleteChar as the delete character

Miguel de Icaza 7 년 전
부모
커밋
8c75e412cb
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 3
      Terminal.Gui/Views/TextField.cs

+ 2 - 3
Terminal.Gui/Views/TextField.cs

@@ -159,8 +159,6 @@ namespace Terminal.Gui {
 		public override bool ProcessKey (KeyEvent kb)
 		{
 			switch (kb.Key) {
-			case Key.Delete:
-#if false
 			case Key.DeleteChar:
 				if (text.Length == 0 || text.Length == point)
 					return true;
@@ -168,7 +166,8 @@ namespace Terminal.Gui {
 				SetText (text [0, point] + text [point + 1, null]);
 				Adjust ();
 				break;
-#endif
+
+			case Key.Delete:
 			case Key.Backspace:
 				if (point == 0)
 					return true;