fix option backspace hanging

This commit is contained in:
Will McGugan
2022-05-24 12:26:45 +01:00
parent 79a560f395
commit 1366335dc8
2 changed files with 3 additions and 3 deletions

View File

@@ -47,7 +47,7 @@ ANSI_SEQUENCES: Dict[str, Tuple[Keys, ...]] = {
# support it. (Most terminals send ControlH when backspace is pressed.)
# See: http://www.ibb.net/~anne/keyboard.html
"\x7f": (Keys.ControlH,),
# --
"\x1b\x7f": (Keys.ControlW,),
# Various
"\x1b[1~": (Keys.Home,), # tmux
"\x1b[2~": (Keys.Insert,),

View File

@@ -70,7 +70,7 @@ def import_app(import_name: str) -> App:
if "app" in global_vars:
# App exists, lets use that
try:
app = global_vars[name]
app = global_vars["app"]
except KeyError:
raise AppFail(f"App {name!r} not found in {lib!r}")
else:
@@ -143,7 +143,7 @@ def run_app(import_name: str, dev: bool) -> None:
features = set(parse_features(os.environ.get("TEXTUAL", "")))
if dev:
features.add("debug")
features.add("dev")
features.add("devtools")
os.environ["TEXTUAL"] = ",".join(sorted(features))