Skip to content

Commit

Permalink
Fix: Disable line annotations in distraction free mode (#514)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
deathaxe committed Sep 10, 2018
1 parent a4d3f64 commit 5813910
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,14 @@ def __init__(self, view, settings):
def is_enabled(self):
"""Check if blame phantom text is enabled.
Note:
Keep disabled if `draw_centered` is True because ST3176 does not
place the phantom to the correct place then.
Returns:
bool: True if blame phantom text is enabled, False otherwise.
"""
if not _HAVE_PHANTOMS:
if not _HAVE_PHANTOMS or self.settings.get('draw_centered'):
return False
show_phantoms = self.settings.get('show_line_annotation', 'auto')
if show_phantoms == 'auto':
Expand Down

0 comments on commit 5813910

Please sign in to comment.