Commits

abudden committed f8b2124

Completed list_entries removal.

Comments (0)

Files changed (3)

plugin/TagHighlight/module/languages.py

 
         # Import language specific modules: this will make them be parsed
         # and will add to the registry
-        self.defaults = LoadDataFile('language_defaults.txt', language_list_entries)
+        self.defaults = LoadDataFile('language_defaults.txt')
         for entry in language_list_entries:
             if entry in self.defaults:
                 if not isinstance(self.defaults[entry], list):
                     self.defaults[entry] = self.defaults[entry].split(',')
 
         for language_file in GlobData('languages/*.txt'):
-            language_dict = LoadDataFile(language_file, language_list_entries)
+            language_dict = LoadDataFile(language_file)
 
             for entry in language_list_entries:
                 if entry in language_dict:

plugin/TagHighlight/module/options.py

     RequiredKeys = ['CommandLineSwitches', 'Type', 'Default', 'Help']
 
     global AllOptions
-    AllOptions = LoadDataFile('options.txt', ListKeys)
+    AllOptions = LoadDataFile('options.txt')
 
     for dest in AllOptions.keys():
+        for key in ListKeys:
+            if key in AllOptions and not isinstance(AllOptions[key], list):
+                AllOptions[key] = [AllOptions[key]]
         # Check we've got all of the required keys
         for key in RequiredKeys:
             if key not in AllOptions[dest]:
         elif AllOptions[dest]['Type'] == 'list':
             if AllOptions[dest]['Default'] == '[]':
                 AllOptions[dest]['Default'] = []
-            else:
+            elif not isinstance(AllOptions[dest]['Default'], list):
                 AllOptions[dest]['Default'] = AllOptions[dest]['Default'].split(',')
 
 LoadOptionSpecification()

plugin/TagHighlight/module/utilities.py

 def GenerateValidKeywordRange(iskeyword):
     # Generally obeys Vim's iskeyword setting, but
     # only allows characters in ascii range
-    ValidKeywordSets = iskeyword.split(',')
+    if isinstance(iskeyword, list):
+        ValidKeywordSets = iskeyword
+    else:
+        ValidKeywordSets = iskeyword.split(',')
     rangeMatcher = re.compile('^(?P<from>(?:\d+|\S))-(?P<to>(?:\d+|\S))$')
     falseRangeMatcher = re.compile('^^(?P<from>(?:\d+|\S))-(?P<to>(?:\d+|\S))$')
     validList = []
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.