Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/macdoc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MyDocument.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/MyDocument.cs b/MyDocument.cs
index d802858..7f2eecd 100644
--- a/MyDocument.cs
+++ b/MyDocument.cs
@@ -385,10 +385,12 @@ namespace macdoc
partial void StartSearch (NSSearchField sender)
{
var contents = sender.StringValue;
- if (contents == null || contents == "")
+ if (string.IsNullOrEmpty (contents))
return;
tabSelector.SelectAt (2);
Search (contents);
+ // Unselect the search term in case user is typing slowly
+ sender.CurrentEditor.SelectedRange = new NSRange (contents.Length, 0);
}
// Typing in the index panel