mirror of
https://github.com/hrsh7th/nvim-cmp
synced 2024-09-16 20:54:03 +02:00
improve pattern handling
This commit is contained in:
parent
e1f1b40790
commit
2743dd989e
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ end
|
|||
---@return integer
|
||||
context.get_offset = function(self, keyword_pattern)
|
||||
return self.cache:ensure({ 'get_offset', keyword_pattern, self.cursor_before_line }, function()
|
||||
return pattern.offset(keyword_pattern .. '\\m$', self.cursor_before_line) or self.cursor.col
|
||||
return pattern.offset([[\%(]] .. keyword_pattern .. [[\)\m$]], self.cursor_before_line) or self.cursor.col
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue