Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError! #117

Open
ryanpcmcquen opened this issue Aug 13, 2020 · 3 comments
Open

IndexError! #117

ryanpcmcquen opened this issue Aug 13, 2020 · 3 comments

Comments

@ryanpcmcquen
Copy link

  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1381, in run_
    self.view.end_edit(edit)
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime.py", line 1072, in end_edit
    sublime_api.view_end_edit(self.view_id, edit.edit_token)
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 846, in on_modified
    run_view_callbacks('on_modified', view_id)
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 665, in run_view_callbacks
    callback(v, *args)
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 147, in profiler
    return event_handler(*args)
  File "/Users/rmcquen/Library/Application Support/Sublime Text 3/Installed Packages/AutoFileName.sublime-package/autofilename.py", line 162, in on_modified
    sel = view.sel()[0].a
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime.py", line 846, in __getitem__
    raise IndexError()
IndexError```
@ryanpcmcquen
Copy link
Author

All these calls:

sel = view.sel()[0].a

Should be wrapped like so:

try:
	sel = view.sel()[0].a
except IndexError:
	pass

@jingyuexing
Copy link

SAME ERROR!

@rchl
Copy link

rchl commented Aug 10, 2022

This should be fixed as it can randomly break ST and even affect other packages.

@liamcain do you have time to address it? Alternatively are you open to transferring this repo to https://github.com/SublimeText/ org?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants