ui: Fixed issues in search field

* Fixed crashes when pressing return and only ? or ?? was entered
* Fixed "Find Symbol" after "Find Text" will remove the ?
* Do fulltext search when no match was found for the entered text
* Select current matches when using "Find Symbol"

bug id = 251
This commit is contained in:
Eberhard Graether
2016-12-01 11:21:32 +01:00
parent 6a23e483c8
commit 6e0eb89cd0
2 changed files with 48 additions and 5 deletions
+6 -2
View File
@@ -407,6 +407,12 @@ std::shared_ptr<TokenLocationCollection> PersistentStorage::getFullTextSearchLoc
{
TRACE();
std::shared_ptr<TokenLocationCollection> collection = std::make_shared<TokenLocationCollection>();
if (!searchTerm.size())
{
return collection;
}
if (m_fullTextSearchIndex.fileCount() == 0)
{
MessageStatus("Building fulltext search index", false, true).dispatch();
@@ -418,8 +424,6 @@ std::shared_ptr<TokenLocationCollection> PersistentStorage::getFullTextSearchLoc
false, true
).dispatch();
std::shared_ptr<TokenLocationCollection> collection = std::make_shared<TokenLocationCollection>();
std::vector<FullTextSearchResult> hits = m_fullTextSearchIndex.searchForTerm(searchTerm);
int termLength = searchTerm.length();