Use the same parser for resize_window actions and session setting

This commit is contained in:
Kovid Goyal 2022-06-14 20:03:21 +05:30
parent 1d846f3744
commit f8d01d2c4f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -88,11 +88,10 @@ class Session:
t.pending_resize_spec = None
def resize_window(self, args: List[str]) -> None:
steps = 1
if len(args) > 1:
steps = int(args[1])
from .options.utils import resize_window
s = resize_window('resize_window', shlex.join(args))[1]
spec: ResizeSpec = s[0], s[1]
t = self.tabs[-1]
spec = args[0], steps
if t.windows:
t.windows[-1].resize_spec = spec
else: