DRYer
This commit is contained in:
parent
12d7c7314a
commit
30c7ff341f
@ -318,7 +318,9 @@ def run_loop(args: HintsCLIOptions, text: str, all_marks: Sequence[Mark], index_
|
|||||||
return {
|
return {
|
||||||
'match': handler.text_matches, 'programs': args.program,
|
'match': handler.text_matches, 'programs': args.program,
|
||||||
'multiple_joiner': args.multiple_joiner, 'customize_processing': args.customize_processing,
|
'multiple_joiner': args.multiple_joiner, 'customize_processing': args.customize_processing,
|
||||||
'type': args.type, 'groupdicts': handler.groupdicts, 'extra_cli_args': extra_cli_args, 'linenum_action': args.linenum_action
|
'type': args.type, 'groupdicts': handler.groupdicts, 'extra_cli_args': extra_cli_args,
|
||||||
|
'linenum_action': args.linenum_action,
|
||||||
|
'cwd': os.getcwd(),
|
||||||
}
|
}
|
||||||
raise SystemExit(loop.return_code)
|
raise SystemExit(loop.return_code)
|
||||||
|
|
||||||
@ -751,12 +753,7 @@ def handle_result(args: List[str], data: Dict[str, Any], target_window_id: int,
|
|||||||
elif program == '*':
|
elif program == '*':
|
||||||
set_primary_selection(joined_text())
|
set_primary_selection(joined_text())
|
||||||
else:
|
else:
|
||||||
cwd = None
|
cwd = data['cwd']
|
||||||
w = boss.window_id_map.get(target_window_id)
|
|
||||||
if w is not None:
|
|
||||||
cwd = w.cwd_of_child
|
|
||||||
if w is None:
|
|
||||||
w = boss.active_window
|
|
||||||
program = None if program == 'default' else program
|
program = None if program == 'default' else program
|
||||||
if text_type == 'hyperlink':
|
if text_type == 'hyperlink':
|
||||||
for m in matches:
|
for m in matches:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user