potential fix for fontscaling

This commit is contained in:
2025-04-24 20:14:10 +02:00
parent 89d712fcce
commit 7c37a9e413
2 changed files with 8 additions and 7 deletions

View File

@ -232,6 +232,11 @@ class MarkdownLivePreviewListener(sublime_plugin.EventListener):
if markdown_view.buffer_id() == 0:
return
# Check if the phantom set still exists for this view ID
if markdown_view.id() not in self.phantom_sets:
# View might have been closed between modification and update
return
self.last_update = time.time()
total_region = sublime.Region(0, markdown_view.size())
@ -253,10 +258,6 @@ class MarkdownLivePreviewListener(sublime_plugin.EventListener):
font_scale,
)
print("--- HTML Content Sent to Phantom ---")
print(html)
print("--- End HTML Content ---")
self.phantom_sets[markdown_view.id()].update(
[
sublime.Phantom(