Skip to content

Commit 35a6896

Browse files
settings: Make quick edit phantoms disableable (#353)
1 parent 24d5389 commit 35a6896

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Package/PackageDev.sublime-settings

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
// Each theme containing one of the list's strings is hidden.
2727
"settings.exclude_theme_patterns": [],
2828

29+
// Whether to show the edit settings pencil icon. Close & reopen the
30+
// settings file for this to take effect.
31+
"settings.show_quick_edit_icon": true,
32+
2933
// Whether or not to keep the scope suffix in the suggested test scopes
3034
// i.e. if the base scope is text.html.markdown
3135
// then suggest meta.example.markdown (true) vs meta.example (false).

plugins/settings/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def __init__(self, view):
145145
logger.error("Not a Sublime Text Settings or Project file: %r", filepath)
146146

147147
self.phantom_set = sublime.PhantomSet(self.view, "sublime-settings-edit")
148-
if self._is_base_settings_view():
148+
if self._is_base_settings_view() and get_setting("settings.show_quick_edit_icon"):
149149
self.build_phantoms()
150150

151151
def __del__(self):
@@ -156,7 +156,7 @@ def __del__(self):
156156
def on_modified_async(self):
157157
"""Sublime Text modified event handler to update linting."""
158158
self.do_linting()
159-
if self._is_base_settings_view():
159+
if self._is_base_settings_view() and get_setting("settings.show_quick_edit_icon"):
160160
# This may only occur for unpacked packages
161161
self.build_phantoms()
162162

0 commit comments

Comments
 (0)