Allows navigation to outside a TextView if IsMdiContainer is true.

This commit is contained in:
BDisp
2022-01-15 22:54:49 +00:00
parent 3baf993b63
commit eca55d7d42

View File

@@ -1362,7 +1362,7 @@ namespace Terminal.Gui {
}
var posX = currentColumn - leftColumn;
var posY = currentRow - topRow;
if ( posX > -1 && col >= posX && posX < Frame.Width - RightOffset
if (posX > -1 && col >= posX && posX < Frame.Width - RightOffset
&& topRow <= currentRow && posY < Frame.Height - BottomOffset) {
ResetCursorVisibility ();
Move (col, currentRow - topRow);
@@ -2568,6 +2568,22 @@ namespace Terminal.Gui {
}
break;
case Key _ when ShortcutHelper.GetModifiersKey (kb) == (Key.Tab | Key.CtrlMask):
case Key _ when ShortcutHelper.GetModifiersKey (kb) == Application.AlternateForwardKey:
if (Application.MdiTop != null) {
return SuperView?.FocusNext () == true;
}
return false;
case Key _ when ShortcutHelper.GetModifiersKey (kb) == (Key.Tab | Key.CtrlMask | Key.ShiftMask):
case Key _ when ShortcutHelper.GetModifiersKey (kb) == Application.AlternateBackwardKey:
if (Application.MdiTop != null) {
return SuperView?.FocusPrev () == true;
}
return false;
default:
// Ignore control characters and other special keys
if (kb.Key < Key.Space || kb.Key > Key.CharMask)