SublimeDiffView icon indicating copy to clipboard operation
SublimeDiffView copied to clipboard

Fails with error

Open benmarten opened this issue 6 years ago • 3 comments

This project looks promising... Having hard time to figure out how it works....

I'm in a git repo, made a change and I'm running Diff View: Uncomitted changes, nothing happens.

I see this in Sublime console:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1036, in run_
    return self.run()
  File "/Users/bmarten/Library/Application Support/Sublime Text 3/Installed Packages/DiffView.sublime-package/DiffView.py", line 328, in run
  File "/Users/bmarten/Library/Application Support/Sublime Text 3/Installed Packages/DiffView.sublime-package/DiffView.py", line 89, in do_diff
  File "./python3.3/posixpath.py", line 151, in dirname
AttributeError: 'NoneType' object has no attribute 'rfind'

benmarten avatar Jun 12 '18 20:06 benmarten

I think I've seen this error before when you try running the command with no file open - is that the case here? From your comment I'm guessing not but let me know and I can look into it.

CJTozer avatar Jun 16 '18 23:06 CJTozer

in fact the error comes from this line which is trying to get the filename from the active view - can you tell me if you hit this when your active cursor is inside a version-controlled file?

CJTozer avatar Jun 16 '18 23:06 CJTozer

@CJTozer I am able to reproduce this error when my active cursor is NOT inside a version-controlled file. Placing it inside a version-controlled file fixes the issue.

larrylampco avatar Oct 29 '19 19:10 larrylampco