Skip to content

Commit 206a238

Browse files
committed
Handle no metadata
1 parent 5cfb2db commit 206a238

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ftplugin/python/vim_ipython.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,9 @@ def ipy_complete(base, current_line, pos):
427427
try:
428428
m = get_child_msg(msg_id, timeout=vim_vars.get('ipython_completion_timeout', 2))
429429
matches = m['content']['matches']
430-
metadata = m['content']['metadata']
430+
metadata = m['content'].get('metadata', None)
431+
if not metadata:
432+
metadata = ['' for _ in matches]
431433
# we need to be careful with unicode, because we can have unicode
432434
# completions for filenames (for the %run magic, for example). So the next
433435
# line will fail on those:

0 commit comments

Comments
 (0)