Skip to content

Commit 074d66e

Browse files
froupsykzz
authored andcommitted
BlameCommand: Notice when the file is unsaved: (#26)
1 parent a61e3e4 commit 074d66e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

git-blame.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ def on_phantom_close(self, href):
176176
self.view.erase_phantoms('git-blame')
177177

178178
def run(self, edit):
179+
if self.view.is_dirty():
180+
sublime.status_message("The file needs to be saved for git blame.")
181+
return
182+
179183
phantoms = []
180184
self.view.erase_phantoms('git-blame')
181185
#Before adding the phantom, see if the current phantom that is displayed is at the same spot at the selection

0 commit comments

Comments
 (0)