Skip to content

Commit

Permalink
Trigger completions after cpp scope resolution operator (::)
Browse files Browse the repository at this point in the history
Fixes #15
  • Loading branch information
tweekmonster committed Jun 18, 2017
1 parent ae4552b commit 787dd4d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rplugin/python3/deoplete/sources/deoplete_clang2.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,12 @@ def get_complete_position(self, context):
return m.end()

pat = r'->|\.'
objc = context.get('filetype', '') in ('objc', 'objcpp')
ft = context.get('filetype', '')
objc = ft in ('objc', 'objcpp')
if objc:
pat += r'|[:@\[]|(?:\S\s+)'
elif ft == 'cpp':
pat += r'|::'
pat = r'(?:' + pat + ')'
context['clang2_pattern'] = pat

Expand Down

0 comments on commit 787dd4d

Please sign in to comment.