mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2026-10-23 06:17:14 +08:00
Use re.escape for the g:jedi#call_signature_escape setting (#646)
Fixes https://github.com/davidhalter/jedi-vim/issues/641.
This commit is contained in:
1 parent
671f9f5780
commit
80378d857b
1 file changed
+2
-1
+2
-1
@@ -335,7 +335,8 @@ def clear_call_signatures():
|
||||
# 1. Search for a line with a call signature and save the appended
|
||||
# characters
|
||||
# 2. Actually replace the line and redo the status quo.
|
||||
py_regex = r'%sjedi=([0-9]+), (.*?)%s.*?%sjedi%s'.replace('%s', e)
|
||||
py_regex = r'%sjedi=([0-9]+), (.*?)%s.*?%sjedi%s'.replace(
|
||||
'%s', re.escape(e))
|
||||
for i, line in enumerate(vim.current.buffer):
|
||||
match = re.search(py_regex, line)
|
||||
if match is not None:
|
||||
|
||||
Reference in new issue
Block a user