mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 17:52:02 +02:00
Merge branch 'refactor' of https://github.com/page-down/kitty
This commit is contained in:
@@ -55,7 +55,7 @@ create_job(size_t i, size_t blocksz, GlobalData *global) {
|
||||
if (ans->start >= global->haystack_count) ans->count = 0;
|
||||
else ans->count = global->haystack_count - ans->start;
|
||||
ans->max_haystack_len = 0;
|
||||
for (size_t i = ans->start; i < ans->start + ans->count; i++) ans->max_haystack_len = MAX(ans->max_haystack_len, global->haystack[i].haystack_len);
|
||||
for (size_t j = ans->start; j < ans->start + ans->count; j++) ans->max_haystack_len = MAX(ans->max_haystack_len, global->haystack[j].haystack_len);
|
||||
if (ans->count > 0) {
|
||||
ans->workspace = alloc_workspace(ans->max_haystack_len, global);
|
||||
if (!ans->workspace) { free(ans); return NULL; }
|
||||
|
||||
@@ -219,16 +219,16 @@ def parse_ssh_args(args: List[str]) -> Tuple[List[str], List[str], bool]:
|
||||
expecting_option_val = False
|
||||
passthrough = False
|
||||
stop_option_processing = False
|
||||
for arg in args:
|
||||
for argument in args:
|
||||
if len(server_args) > 1 or stop_option_processing:
|
||||
server_args.append(arg)
|
||||
server_args.append(argument)
|
||||
continue
|
||||
if arg.startswith('-') and not expecting_option_val:
|
||||
if arg == '--':
|
||||
if argument.startswith('-') and not expecting_option_val:
|
||||
if argument == '--':
|
||||
stop_option_processing = True
|
||||
continue
|
||||
# could be a multi-character option
|
||||
all_args = arg[1:]
|
||||
all_args = argument[1:]
|
||||
for i, arg in enumerate(all_args):
|
||||
arg = '-' + arg
|
||||
if arg in passthrough_args:
|
||||
@@ -247,10 +247,10 @@ def parse_ssh_args(args: List[str]) -> Tuple[List[str], List[str], bool]:
|
||||
raise InvalidSSHArgs(f'unknown option -- {arg[1:]}')
|
||||
continue
|
||||
if expecting_option_val:
|
||||
ssh_args.append(arg)
|
||||
ssh_args.append(argument)
|
||||
expecting_option_val = False
|
||||
continue
|
||||
server_args.append(arg)
|
||||
server_args.append(argument)
|
||||
if not server_args:
|
||||
raise InvalidSSHArgs()
|
||||
return ssh_args, server_args, passthrough
|
||||
|
||||
@@ -309,10 +309,6 @@ class ThemesHandler(Handler):
|
||||
next_line()
|
||||
next_line()
|
||||
|
||||
def write_line(text: str) -> None:
|
||||
self.write(text)
|
||||
next_line()
|
||||
|
||||
self.cmd.set_cursor_position()
|
||||
next_line()
|
||||
self.cmd.styled(theme.name.center(sz), bold=True, fg='green')
|
||||
|
||||
Reference in New Issue
Block a user