Skip to content

Commit a34015d

Browse files
committed
Read settings only, if no args are given
Previously, settings were read and passed as default value, in case no explicit args of specified name were given. Now read settings only on demand.
1 parent e02cd91 commit a34015d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

latextools/jumpto_pdf.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,12 @@ def run(self, **args):
8585
return
8686

8787
# Check prefs for PDF focus and sync
88-
keep_focus = args.get("keep_focus", get_setting("keep_focus", True, view))
89-
forward_sync = args.get("forward_sync", get_setting("forward_sync", True, view))
88+
keep_focus = args.get("keep_focus")
89+
if keep_focus is None:
90+
keep_focus = get_setting("keep_focus", True, view)
91+
forward_sync = args.get("forward_sync")
92+
if forward_sync is None:
93+
forward_sync = get_setting("forward_sync", True, view)
9094

9195
# If invoked from keybinding, we sync
9296
# Rationale: if the user invokes the jump command, s/he wants to see

0 commit comments

Comments
 (0)