Skip to content

Commit 87ed471

Browse files
author
Caspar Gruijthuijsen
committed
sending untitled file to matlab no longer yields error
1 parent 213bba3 commit 87ed471

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

auto_matlab_commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def run(self, command):
261261
vars['selection'] += view.substr(region)
262262

263263
# update the matlab package parent and package member
264-
mo = re.search(r'(.*\\(?!\+).*?|.*)\\\+?(.*)\.m', vars['file'])
264+
mo = re.search(r'(.*\\(?!\+).*?|.*)\\\+?(.*)\.m', vars.get('file', ''))
265265
if mo:
266266
vars['package_parent'] = mo.group(1)
267267
vars['package_member'] = re.sub(r'\\\+?', '.', mo.group(2))

0 commit comments

Comments
 (0)