This commit is contained in:
Kovid Goyal 2022-05-01 07:11:21 +05:30
commit bb7e4039e8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 1 deletions

View File

@ -37,7 +37,10 @@ Apply marker to the window this command is run in, rather than the active window
def message_to_kitty(self, global_opts: RCOptions, opts: 'CLIOptions', args: ArgsType) -> PayloadType:
if len(args) < 2:
self.fatal('Invalid marker specification: {}'.format(' '.join(args)))
parse_marker_spec(args[0], args[1:])
try:
parse_marker_spec(args[0], args[1:])
except Exception as err:
self.fatal(f"Failed to parse marker specification {' '.join(args)} with error: {err}")
return {'match': opts.match, 'self': opts.self, 'marker_spec': args}
def response_from_kitty(self, boss: Boss, window: Optional[Window], payload_get: PayloadGetType) -> ResponseType:

View File

@ -35,6 +35,8 @@ class ScrollWindow(RemoteCommand):
options_spec = MATCH_WINDOW_OPTION
def message_to_kitty(self, global_opts: RCOptions, opts: 'CLIOptions', args: ArgsType) -> PayloadType:
if len(args) < 1:
self.fatal('Scroll amount must be specified')
amt = args[0]
amount: Tuple[Union[str, int], Optional[str]] = (amt, None)
if amt not in ('start', 'end'):