diff --git a/ExpandTabsOnSave.py b/ExpandTabsOnSave.py index c839438..354463c 100644 --- a/ExpandTabsOnSave.py +++ b/ExpandTabsOnSave.py @@ -12,8 +12,8 @@ def on_pre_save(self, view): """Run ST's 'expand_tabs' command when saving a file.""" if view.settings().get('convert_tabspaces_on_save') == 1: if view.settings().get('translate_tabs_to_spaces') == 1: - view.window().run_command('expand_tabs') + view.run_command('expand_tabs') else: - view.window().run_command('unexpand_tabs') + view.run_command('unexpand_tabs')