lib/sup/modes/search_results_mode.rb in sup-0.14.0 vs lib/sup/modes/search_results_mode.rb in sup-0.14.1

- old
+ new

@@ -38,10 +38,14 @@ ## the message, and search against it to see if i have > 0 results, ## but that seems pretty insane. def self.spawn_from_query text begin - query = Index.parse_query(text) + if SearchManager.predefined_queries.has_key? text + query = SearchManager.predefined_queries[text] + else + query = Index.parse_query(text) + end return unless query short_text = text.length < 20 ? text : text[0 ... 20] + "..." mode = SearchResultsMode.new query BufferManager.spawn "search: \"#{short_text}\"", mode mode.load_threads :num => mode.buffer.content_height