From e94cd4bc85960e52deccda9fb4d68a72dba157ed Mon Sep 17 00:00:00 2001 From: Charlie Kindel Date: Mon, 31 Oct 2022 22:20:25 -0600 Subject: [PATCH] renamed ClearState --- Terminal.Gui/Core/SearchCollectionNavigator.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Terminal.Gui/Core/SearchCollectionNavigator.cs b/Terminal.Gui/Core/SearchCollectionNavigator.cs index 6c02b9664..c87865b6e 100644 --- a/Terminal.Gui/Core/SearchCollectionNavigator.cs +++ b/Terminal.Gui/Core/SearchCollectionNavigator.cs @@ -120,7 +120,7 @@ namespace Terminal.Gui { candidateState.Length > 1); if (idxCandidate != -1) { - // found "dd" so candidate state is accepted + // found "dd" so candidate searchstring is accepted lastKeystroke = DateTime.Now; SearchString = candidateState; return idxCandidate; @@ -134,7 +134,7 @@ namespace Terminal.Gui { // if no changes to current state manifested if (idxCandidate == currentIndex || idxCandidate == -1) { // clear history and treat as a fresh letter - ClearState (); + ClearSearchString (); // match on the fresh letter alone SearchString = new string (keyStruck, 1); @@ -147,7 +147,7 @@ namespace Terminal.Gui { } else { // clear state because keypress was a control char - ClearState (); + ClearSearchString (); // control char indicates no selection return -1; @@ -155,7 +155,7 @@ namespace Terminal.Gui { } /// - /// Gets the index of the next item in the collection that matches the current + /// Gets the index of the next item in the collection that matches . /// /// The index in the collection to start the search from. /// The search string to use. @@ -164,7 +164,7 @@ namespace Terminal.Gui { /// e.g. "ca" + 'r' should stay on "car" and not jump to "cart". If (the default), /// the next matching item will be returned, even if it is above in the collection. /// - /// + /// The index of the next matching item or if no match was found. internal int GetNextMatchingItem (int currentIndex, string search, bool minimizeMovement = false) { if (string.IsNullOrEmpty (search)) { @@ -211,7 +211,7 @@ namespace Terminal.Gui { } } - private void ClearState () + private void ClearSearchString () { SearchString = ""; lastKeystroke = DateTime.Now;