From 54c3b9fab7845d4709a395d83bd6f1c84ca79b13 Mon Sep 17 00:00:00 2001 From: herr kaste Date: Sun, 30 Dec 2018 23:52:48 +0100 Subject: [PATCH] Show `file_path` in title if given --- core/commands/diff.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/commands/diff.py b/core/commands/diff.py index e56bd0dbf..c6f6c2b60 100644 --- a/core/commands/diff.py +++ b/core/commands/diff.py @@ -97,7 +97,9 @@ def run_async(self, in_cached_mode=False, file_path=None, current_file=False, ba settings.set("result_base_dir", repo_path) if not title: - title = (DIFF_CACHED_TITLE if in_cached_mode else DIFF_TITLE).format(os.path.basename(repo_path)) + title = (DIFF_CACHED_TITLE if in_cached_mode else DIFF_TITLE).format( + os.path.basename(file_path) if file_path else os.path.basename(repo_path) + ) diff_view.set_name(title) diff_view.set_syntax_file("Packages/GitSavvy/syntax/diff_view.sublime-syntax") diff_views[view_key] = diff_view