File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 3
3
import subprocess
4
4
import sys
5
5
from abc import ABCMeta , abstractmethod
6
- from urllib .parse import parse_qs , quote_plus , urlparse
6
+ from urllib .parse import parse_qs , urlparse
7
7
8
8
import sublime
9
9
@@ -96,12 +96,12 @@ def handle_phantom_button(self, href):
96
96
elif url .path == "show" :
97
97
sha = querystring ["sha" ][0 ]
98
98
try :
99
- desc = self .get_commit_text (sha , self .view .file_name ())
99
+ desc = self .get_commit_text (sha , self ._view () .file_name ())
100
100
except Exception as e :
101
101
self .communicate_error (e )
102
102
return
103
103
104
- buf = self .view .window ().new_file ()
104
+ buf = self ._view () .window ().new_file ()
105
105
buf .run_command (
106
106
"blame_insert_commit_description" ,
107
107
{"desc" : desc , "scratch_view_name" : "commit " + sha },
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ def run(self, edit):
27
27
return
28
28
29
29
self .view .erase_phantoms (PHANTOM_KEY_ALL )
30
- phantoms = [] # type: list[sublime.Phantom]
30
+ phantoms = [] # type: list[sublime.Phantom] # type: ignore[misc]
31
31
32
32
# If they are currently shown, toggle them off and return.
33
33
if self .view .settings ().get (VIEW_SETTING_PHANTOM_ALL_DISPLAYED , False ):
Original file line number Diff line number Diff line change 1
1
import threading
2
+
2
3
import sublime
3
4
import sublime_plugin
4
5
5
6
from .base import BaseBlame
6
- from .templates import blame_inline_phantom_css , blame_inline_phantom_html_template
7
7
from .settings import (
8
- pkg_settings ,
9
- PKG_SETTINGS_KEY_INLINE_BLAME_ENABLED ,
10
8
PKG_SETTINGS_KEY_INLINE_BLAME_DELAY ,
9
+ PKG_SETTINGS_KEY_INLINE_BLAME_ENABLED ,
10
+ pkg_settings ,
11
11
)
12
+ from .templates import blame_inline_phantom_css , blame_inline_phantom_html_template
12
13
13
14
INLINE_BLAME_PHANTOM_SET_KEY = "git-blame-inline"
14
15
15
16
16
17
class BlameInlineListener (BaseBlame , sublime_plugin .ViewEventListener ):
17
18
@classmethod
18
19
def is_applicable (cls , settings ):
20
+ # @todo Fix inline blame (sometimes?) remaining enabled when the user setting for it is edited from true -> false
19
21
return pkg_settings ().get (PKG_SETTINGS_KEY_INLINE_BLAME_ENABLED )
20
22
21
23
def __init__ (self , view ):
You can’t perform that action at this time.
0 commit comments