浏览代码

Clear the TextField selected text when loses focus.

BDisp 5 年之前
父节点
当前提交
07a92f989e
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Terminal.Gui/Views/TextField.cs

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

@@ -85,6 +85,8 @@ namespace Terminal.Gui {
 		{
 			if (Application.mouseGrabView != null && Application.mouseGrabView == this)
 				Application.UngrabMouse ();
+			if (SelectedLength != 0)
+				ClearAllSelection ();
 		}
 
 		public override Rect Frame {