Created
October 28, 2009 07:12
-
-
Save arika/220321 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- a/lib/plugins/defaults/standard_commands.rb | |
| +++ b/lib/plugins/defaults/standard_commands.rb | |
| @@ -179,7 +179,7 @@ module Termtter::Client | |
| register_hook(:highlight_for_search_query, :point => :pre_coloring) do |text, event| | |
| case event | |
| when SearchEvent | |
| - query = event.query.split(/\s/).map {|q|Regexp.quote(q)}.join("|") | |
| + query = event.query.split(/\s/).reject {|q|q == 'OR'}.map {|q|Regexp.quote(q)}.join("|") | |
| text.gsub(/(#{query})/i, '<on_magenta><white>\1</white></on_magenta>') | |
| else | |
| text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment