Set zoom to default instead of 100% with :zoom/=.
This commit is contained in:
parent
f50a19a488
commit
b01041e455
@ -508,7 +508,7 @@ Syntax: +:zoom ['zoom']+
|
|||||||
|
|
||||||
Set the zoom level for the current tab.
|
Set the zoom level for the current tab.
|
||||||
|
|
||||||
The zoom can be given as argument or as [count]. If neither of both is given, the zoom is set to 100%.
|
The zoom can be given as argument or as [count]. If neither of both is given, the zoom is set to the default zoom.
|
||||||
|
|
||||||
==== positional arguments
|
==== positional arguments
|
||||||
* +'zoom'+: The zoom percentage to set.
|
* +'zoom'+: The zoom percentage to set.
|
||||||
|
@ -619,14 +619,15 @@ class CommandDispatcher:
|
|||||||
"""Set the zoom level for the current tab.
|
"""Set the zoom level for the current tab.
|
||||||
|
|
||||||
The zoom can be given as argument or as [count]. If neither of both is
|
The zoom can be given as argument or as [count]. If neither of both is
|
||||||
given, the zoom is set to 100%.
|
given, the zoom is set to the default zoom.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
zoom: The zoom percentage to set.
|
zoom: The zoom percentage to set.
|
||||||
count: The zoom percentage to set.
|
count: The zoom percentage to set.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
level = cmdutils.arg_or_count(zoom, count, default=100)
|
default = config.get('ui', 'default-zoom')
|
||||||
|
level = cmdutils.arg_or_count(zoom, count, default=default)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
raise cmdexc.CommandError(e)
|
raise cmdexc.CommandError(e)
|
||||||
tab = self._current_widget()
|
tab = self._current_widget()
|
||||||
|
Loading…
Reference in New Issue
Block a user