Skip to content

Commit

Permalink
Fix for delimiter detection with unsaved file
Browse files Browse the repository at this point in the history
  • Loading branch information
wadetb committed Nov 7, 2016
1 parent ff0d314 commit 4b42651
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions csvplugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,12 @@ def GetViewSetting(self, name, default):
def DetermineDelimiter(self):
filename = self.view.file_name()

self.delimiter_mapping = self.settings.get('delimiter_mapping', {})
for k, v in self.delimiter_mapping.items():
if fnmatch.fnmatch(filename, k):
self.delimiter = v
return
if filename:
self.delimiter_mapping = self.settings.get('delimiter_mapping', {})
for k, v in self.delimiter_mapping.items():
if fnmatch.fnmatch(filename, k):
self.delimiter = v
return

self.delimiter = self.GetViewSetting('delimiter', ',')

Expand Down

0 comments on commit 4b42651

Please sign in to comment.