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

Conflicts with GitSavvy dashboards #133

Open
ghost opened this issue Sep 7, 2016 · 5 comments
Open

Conflicts with GitSavvy dashboards #133

ghost opened this issue Sep 7, 2016 · 5 comments

Comments

@ghost
Copy link

ghost commented Sep 7, 2016

When I'm changing GitSavvy dashboards via Tab key, TurnJS outputs to the console:

Traceback (most recent call last):
  File "C:\Tools\SublimeText\sublime_plugin.py", line 320, in on_selection_modified_async
    callback.on_selection_modified_async(v)
  File "C:\Users\i.oleksandrov\AppData\Roaming\Sublime Text 3\Packages\tern_for_sublime\tern.py", line 53, in on_selection_modified_async
    on_selection_modified(view)
  File "C:\Users\i.oleksandrov\AppData\Roaming\Sublime Text 3\Packages\tern_for_sublime\tern.py", line 32, in on_selection_modified
    pfile = get_pfile(view)
  File "C:\Users\i.oleksandrov\AppData\Roaming\Sublime Text 3\Packages\tern_for_sublime\tern.py", line 94, in get_pfile
    if not is_js_file(view): return None
  File "C:\Users\i.oleksandrov\AppData\Roaming\Sublime Text 3\Packages\tern_for_sublime\tern.py", line 16, in is_js_file
    return view.score_selector(sel_end(view.sel()[0]), "source.js") > 0
  File "C:\Tools\SublimeText\sublime.py", line 538, in __getitem__
    raise IndexError()
IndexError
@marijnh
Copy link
Member

marijnh commented Sep 7, 2016

You appear to have cut off the interesting part of the stack trace.

@ghost
Copy link
Author

ghost commented Sep 7, 2016

@marijnh Sorry, updated.

marijnh added a commit that referenced this issue Sep 7, 2016
@marijnh
Copy link
Member

marijnh commented Sep 7, 2016

Could you see if attached patch helps?

@ghost
Copy link
Author

ghost commented Sep 7, 2016

Nope, it's pretty the same console output:

Traceback (most recent call last):
  File "C:\Tools\SublimeText\sublime_plugin.py", line 320, in on_selection_modified_async
    callback.on_selection_modified_async(v)
  File "C:\Users\i.oleksandrov\AppData\Roaming\Sublime Text 3\Packages\tern_for_sublime\tern.py", line 53, in on_selection_modified_async
    on_selection_modified(view)
  File "C:\Users\i.oleksandrov\AppData\Roaming\Sublime Text 3\Packages\tern_for_sublime\tern.py", line 32, in on_selection_modified
    pfile = get_pfile(view)
  File "C:\Users\i.oleksandrov\AppData\Roaming\Sublime Text 3\Packages\tern_for_sublime\tern.py", line 94, in get_pfile
    if not is_js_file(view): return None
  File "C:\Users\i.oleksandrov\AppData\Roaming\Sublime Text 3\Packages\tern_for_sublime\tern.py", line 16, in is_js_file
    return len(view.sel()) > 0 & view.score_selector(sel_end(view.sel()[0]), "source.js") > 0
  File "C:\Tools\SublimeText\sublime.py", line 538, in __getitem__
    raise IndexError()
IndexError

@marijnh
Copy link
Member

marijnh commented Sep 7, 2016

Ugh, okay, so indexing view.sel() is somehow returning an index error even though it's length is > 0. Not sure what's going on there, but something seems to be breaking a part of ST that Tern isn't responsible for.

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

1 participant