Skip to content

Commit 5813910

Browse files
committed
Fix: Disable line annotations in distraction free mode (#514)
Fixes #514 Sublime Text 3176 does not place phantoms correctly, if `draw_centered` setting is set `true`. The core issue is reported at: sublimehq/sublime_text#2416
1 parent a4d3f64 commit 5813910

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/annotation.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,14 @@ def __init__(self, view, settings):
6969
def is_enabled(self):
7070
"""Check if blame phantom text is enabled.
7171
72+
Note:
73+
Keep disabled if `draw_centered` is True because ST3176 does not
74+
place the phantom to the correct place then.
75+
7276
Returns:
7377
bool: True if blame phantom text is enabled, False otherwise.
7478
"""
75-
if not _HAVE_PHANTOMS:
79+
if not _HAVE_PHANTOMS or self.settings.get('draw_centered'):
7680
return False
7781
show_phantoms = self.settings.get('show_line_annotation', 'auto')
7882
if show_phantoms == 'auto':

0 commit comments

Comments
 (0)