Skip to content

Commit

Permalink
Display external tool name in diff menu (if any)
Browse files Browse the repository at this point in the history
  • Loading branch information
maliayas committed Mar 20, 2016
1 parent 6584c19 commit 9553b72
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions file_diffs.py
Expand Up @@ -36,6 +36,10 @@ def run(self, edit, cmd=None):
for item in menu_items:
item['text'] = item['text'].replace('Diff file', 'Diff selection')

if cmd is not None:
for item in menu_items:
item['text'] += ' (' + os.path.splitext(os.path.basename(cmd[0]))[0] + ')'

if not (self.view.file_name() and self.view.is_dirty()):
menu_items.remove(SAVED)

Expand Down

0 comments on commit 9553b72

Please sign in to comment.