manual update of branch

This commit is contained in:
Charlie Kindel
2022-11-02 15:41:29 -06:00
parent 3e7bbb09c2
commit fb7f8a7265
2 changed files with 10 additions and 5 deletions

View File

@@ -3082,10 +3082,15 @@ namespace Terminal.Gui {
/// <returns><see langword="true"/> if it's overridden, <see langword="false"/> otherwise.</returns>
public bool IsOverridden (View view, string method)
{
Type t = view.GetType ();
MethodInfo m = t.GetMethod (method);
return (m.DeclaringType == t || m.ReflectedType == t) && m.GetBaseDefinition ().DeclaringType == typeof (Responder);
MethodInfo m = view.GetType ().GetMethod (method,
BindingFlags.Instance
| BindingFlags.Public
| BindingFlags.NonPublic
| BindingFlags.DeclaredOnly);
if (m == null) {
return false;
}
return m.GetBaseDefinition ().DeclaringType != m.DeclaringType;
}
}
}

View File

@@ -484,7 +484,7 @@ namespace Terminal.Gui {
search.SetFocus ();
}
search.CursorPosition = search.Text.RuneCount;
search.CursorPosition = search.Text.ConsoleWidth;
return base.OnEnter (view);
}