liamcain / AutoFileName

Sublime Text plugin that autocompletes filenames
515 stars 78 forks source link

IndexError in AutoFileName.sublime-package, line 171, in on_selection_modified_async #99

Open evandrocoan opened 7 years ago

evandrocoan commented 7 years ago

IndexError in AutoFileName.sublime-package, line 171, in on_selection_modified_async

Traceback (most recent call last):
  File "D:\User\Dropbox\Applications\SoftwareVersioning\SublimeText\sublime_plugin.py", line 513, in on_selection_modified_async
    callback.on_selection_modified_async(v)
  File "autofilename in D:\User\Dropbox\Applications\SoftwareVersioning\SublimeText\Data\Installed Packages\AutoFileName.sublime-package", line 171, in on_selection_modified_async
  File "D:\User\Dropbox\Applications\SoftwareVersioning\SublimeText\sublime.py", line 641, in __getitem__
    raise IndexError()
IndexError

Steps to reproduce the error

1) Create the package:

test/test.py

import sublime
import sublime_plugin

class FixedClearSelectionsCommand(sublime_plugin.TextCommand):

    def run(self, edit):

        # print( 'Calling FixedClearSelections...' )
        self.view.sel().clear()

test/Commands.sublime-commands

[
  {
    "caption": "Fixed Selections Clear",
    "command": "fixed_clear_selections"
  },
]

2) Select some text. 3) Open the command palette and run the command Fixed Selections Clear.


Related threads:

  1. https://github.com/BoundInCode/AutoFileName/issues/75 IndexError when a selection is modified
  2. https://github.com/BoundInCode/AutoFileName/issues/97 IndexError when pressed alt+shift+right_mouse_click