Move implementation of +hold to Go

No need to pay python interpreter startup cost for --hold
This commit is contained in:
Kovid Goyal
2022-12-01 22:34:56 +05:30
parent 38a7fa73e3
commit f5d2c35755
7 changed files with 100 additions and 19 deletions

View File

@@ -17,7 +17,7 @@ from typing import (
from .borders import Border, Borders
from .child import Child
from .cli_stub import CLIOptions
from .constants import appname, kitty_exe
from .constants import appname, kitty_tool_exe
from .fast_data_types import (
GLFW_MOUSE_BUTTON_LEFT, GLFW_MOUSE_BUTTON_MIDDLE, GLFW_PRESS, GLFW_RELEASE, add_tab,
attach_window, current_focused_os_window_id, detach_window, get_boss,
@@ -413,7 +413,7 @@ class Tab: # {{{
cmd[:0] = shlex.split(line)
else:
cmd[:0] = [resolved_shell(get_options())[0]]
cmd[:0] = [kitty_exe(), '+hold']
cmd[:0] = [kitty_tool_exe(), '__hold_till_enter__']
fenv: Dict[str, str] = {}
if env:
fenv.update(env)