Skip to content

Commit e695c8f

Browse files
committed
Theme Editor: only refresh theme if theme file still exists (fix for vim text editor)
1 parent 73a7dd3 commit e695c8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

theme-editor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def on_zone_click(event):
260260
"update automatically")
261261
# Every time the theme file is modified: reload preview
262262
while True:
263-
if os.path.getmtime(theme_file) > last_edit_time:
263+
if os.path.exists(theme_file) and os.path.getmtime(theme_file) > last_edit_time:
264264
logger.debug("The theme file has been updated, the preview window will refresh")
265265
refresh_theme()
266266
last_edit_time = os.path.getmtime(theme_file)

0 commit comments

Comments
 (0)