Browse Source

Handle End key on Windows

miguel 7 years ago
parent
commit
c6a1b92b5a
2 changed files with 3 additions and 1 deletions
  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 ();
 				Adjust ();
 				break;
 				break;
 
 
+			case Key.End:
 			case Key.ControlE: // End
 			case Key.ControlE: // End
 				point = text.Length;
 				point = text.Length;
 				Adjust ();
 				Adjust ();

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

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