Skip to content

Commit 834b8c6

Browse files
committed
Make sure to use up-to-date viewer scripts at startup
1 parent 208205f commit 834b8c6

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

plugins/viewer/evince_viewer.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,10 @@ def supports_platform(self, platform: str) -> bool:
128128

129129
def supports_keep_focus(self) -> bool:
130130
return True
131+
132+
133+
def latextools_plugin_loaded():
134+
# ensure to work with up-to-date scripts after package updates
135+
from shutil import rmtree
136+
script_dir = Path(sublime.cache_path()) / "LaTeXTools" / "viewer" / "evince"
137+
rmtree(script_dir, ignore_errors=True)

plugins/viewer/skim_viewer.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,10 @@ def supports_keep_focus(self) -> bool:
8080

8181
def supports_platform(self, platform: str) -> bool:
8282
return platform == "osx"
83+
84+
85+
def latextools_plugin_loaded():
86+
# ensure to work with up-to-date scripts after package updates
87+
from shutil import rmtree
88+
script_dir = Path(sublime.cache_path()) / "LaTeXTools" / "viewer" / "skim"
89+
rmtree(script_dir, ignore_errors=True)

0 commit comments

Comments
 (0)