Properly fix zoom handling
This commit is contained in:
parent
8a107fa5b3
commit
2770a935e9
@ -76,16 +76,16 @@ def zoom(tab: apitypes.Tab,
|
|||||||
count: The zoom percentage to set.
|
count: The zoom percentage to set.
|
||||||
quiet: Don't show a zoom level message.
|
quiet: Don't show a zoom level message.
|
||||||
"""
|
"""
|
||||||
if level is not None:
|
if count is not None:
|
||||||
|
int_level = count
|
||||||
|
elif level is not None:
|
||||||
try:
|
try:
|
||||||
int_level = int(level.rstrip('%'))
|
int_level = int(level.rstrip('%'))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise cmdutils.CommandError("zoom: Invalid int value {}"
|
raise cmdutils.CommandError("zoom: Invalid int value {}"
|
||||||
.format(level))
|
.format(level))
|
||||||
elif count is not None:
|
|
||||||
int_level = count
|
|
||||||
else:
|
else:
|
||||||
int_level = config.val.zoom.default
|
int_level = int(config.val.zoom.default)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
tab.zoom.set_factor(int_level / 100)
|
tab.zoom.set_factor(int_level / 100)
|
||||||
|
Loading…
Reference in New Issue
Block a user