Skip to content

Commit 071c186

Browse files
author
yuta_kudo
committed
Add auto completion for table
1 parent 2ae3b3b commit 071c186

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

matlab_kernel/kernel.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,11 @@ def get_completions(self, info):
174174

175175
# For structs, we need to return `structname.fieldname` instead of just
176176
# `fieldname`, which `mtFindAllTabCompletions` does.
177+
# For tables also.
177178

178179
if "." in name:
179180
prefix, _ = name.rsplit(".", 1)
180-
if self._matlab.eval("isstruct({})".format(prefix)):
181+
if self._matlab.eval("isstruct({})".format(prefix)) or self._matlab.eval("istable({})".format(prefix)):
181182
compls = ["{}.{}".format(prefix, compl) for compl in compls]
182183

183184
return compls

0 commit comments

Comments
 (0)