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)
This commit is contained in:
Steve Howell 2013-05-07 11:29:17 -04:00 committed by Tim Abbott
parent 328da1fa07
commit 77d2d669de

View File

@ -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.