浏览代码

Handle End key on Windows

miguel 7 年之前
父节点
当前提交
c6a1b92b5a
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 1 0
      Terminal.Gui/Views/TextField.cs
  2. 2 1
      Terminal.Gui/Views/TextView.cs

+ 1 - 0
Terminal.Gui/Views/TextField.cs

@@ -199,6 +199,7 @@ namespace Terminal.Gui {
 				Adjust ();
 				break;
 
+			case Key.End:
 			case Key.ControlE: // End
 				point = text.Length;
 				Adjust ();

+ 2 - 1
Terminal.Gui/Views/TextView.cs

@@ -6,7 +6,7 @@
 //
 // 
 // TODO:
-// PageUp/PageDown
+// PageUp/PageDown	
 // Attributed text on spans
 // Replace insertion with Insert method
 // String accumulation (Control-k, control-k is not preserving the last new line, see StringToRunes
@@ -815,6 +815,7 @@ namespace Terminal.Gui {
 				}
 				break;
 
+			case Key.End:
 			case Key.ControlE: // End
 				currentLine = GetCurrentLine ();
 				currentColumn = currentLine.Count;