Closed ghost closed 9 years ago
Forgot to add that if show_full_file_path is false, https://github.com/rajeshvaya/Sublime-Extended-Tab-Switcher/blob/master/ExtendedSwitcher.py#L38 will not run. All the relevant append statements only append lists of length 1, so show_quick_panel won't run into an indexing error.
Thanks!
This issue only comes up when show_full_file_path is set to true. show_quick_panel assumes that each element of the items parameter will be of a certain length based on its first element. Buffers such as "Find Results" don't have file names and will cause the plugin to execute statements such as self.open_files.append([string,]). The list [string,] is of length 1, but if show_full_file_path is set to true, the statement self.open_files.append([os.path.basename(file_name), file_path]) (https://github.com/rajeshvaya/Sublime-Extended-Tab-Switcher/blob/master/ExtendedSwitcher.py#L38) will run. This appends a list of length 2. An error will result because show_quick_panel tries to access the 2nd position of a list that is of length 1.
Depending on how the "Find Results" buffer and the other tabs are arranged, an error may not occur at all. For example, if the "Find Results" buffer is the 1st tab (the one furthest to the left), the plugin will still run but the file paths will not be listed.