We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcb0ca8 commit e4503abCopy full SHA for e4503ab
wrap.py
@@ -5,7 +5,12 @@
5
class WrapCommand(sublime_plugin.TextCommand):
6
def run(self, edit):
7
settings = sublime.load_settings("Wrap.sublime-settings")
8
- extension = self.view.file_name().split(".")[-1]
+
9
+ file_name = self.view.file_name()
10
+ if file_name:
11
+ extension = self.view.file_name().split(".")[-1]
12
+ else: # In blank view without file open
13
+ extension = ""
14
15
# Determine bracket type
16
for c in settings.get("contexts"):
0 commit comments