Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save arika/220321 to your computer and use it in GitHub Desktop.

Select an option

Save arika/220321 to your computer and use it in GitHub Desktop.
--- 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