From 77d2d669decc979c154dfcce23bd5be88bd3cd1a Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Tue, 7 May 2013 11:29:17 -0400 Subject: [PATCH] Fix highlighting for stream typeahead in compose box. Recently the typeahead for streams in the compose box was modified so that streams only matched queries when the query was a prefix to the stream. When that change was made, the old highlighting behavior had been mistakenly left in place. This commit fixes the highlighting. (imported from commit b7ec33daba46978df58eb91306686a4f1a57c7fa) --- zephyr/static/js/composebox_typeahead.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zephyr/static/js/composebox_typeahead.js b/zephyr/static/js/composebox_typeahead.js index 31039fe16f..b288474121 100644 --- a/zephyr/static/js/composebox_typeahead.js +++ b/zephyr/static/js/composebox_typeahead.js @@ -180,7 +180,10 @@ exports.initialize = function () { return subs.subscribed_streams(); }, items: 3, - highlighter: composebox_typeahead_highlighter, + highlighter: function (item) { + var query = this.query; + return typeahead_helper.highlight_query_in_phrase(query, item); + }, matcher: function (item) { // The matcher for "stream" is strictly prefix-based, // because we want to avoid mixing up streams.