Skip to content

Commit

Permalink
Fix #521 grep interactive highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Aug 18, 2018
1 parent f06c6d6 commit a5bcdf6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions rplugin/python3/denite/source/grep.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,13 @@ def define_syntax(self):
self.vim.command(
'syntax region ' + self.syntax_name + ' start=// end=/$/ '
'contains=deniteSource_grepHeader,deniteMatchedRange contained')
self.vim.command(
'syntax match deniteGrepPatterns ' +
r'/%s/ ' % r'\|'.join(util.regex_convert_str_vim(pattern)
for pattern in self.context['__patterns']) +
'contained containedin=' + self.syntax_name)
if self.context['__patterns']:
self.vim.command(
'syntax match deniteGrepPatterns ' +
r'/%s/ ' % r'\|'.join(
util.regex_convert_str_vim(pattern)
for pattern in self.context['__patterns']) +
'contained containedin=' + self.syntax_name)

def gather_candidates(self, context):
if context['event'] == 'interactive':
Expand Down

0 comments on commit a5bcdf6

Please sign in to comment.