Browse Source

manual update of branch

Charlie Kindel 2 năm trước cách đây
mục cha
commit
fb7f8a7265
2 tập tin đã thay đổi với 10 bổ sung5 xóa
  1. 9 4
      Terminal.Gui/Core/View.cs
  2. 1 1
      Terminal.Gui/Views/ComboBox.cs

+ 9 - 4
Terminal.Gui/Core/View.cs

@@ -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;
 		}
 	}
 }

+ 1 - 1
Terminal.Gui/Views/ComboBox.cs

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