Tab completion fixes.

This commit is contained in:
Storm Dragon
2026-05-12 17:39:56 -04:00
parent b599a25945
commit 96c5184450
7 changed files with 234 additions and 6 deletions
+21
View File
@@ -212,6 +212,27 @@ def test_recent_tab_screen_update_works_without_key_input_snapshot():
assert manager.process_update() == "cuments/"
@pytest.mark.unit
def test_recent_raw_pty_tab_speaks_short_completion_without_capture():
manager, env, input_manager = _build_env(
"cd Documents/".ljust(20), {"x": 13, "y": 0}
)
input_manager.get_last_deepest_input.return_value = ["KEY_TAB"]
input_manager.get_last_event.return_value = None
env["screen"]["old_content_text"] = "cd Docume".ljust(20)
env["screen"]["old_cursor"] = {"x": 9, "y": 0}
env["commandBuffer"]["tabCompletion"]["pending"] = None
_set_screen_update(
env,
"cd Documents/".ljust(20),
{"x": 13, "y": 0},
delta="nts/",
typing=True,
)
assert manager.process_update() == "nts/"
@pytest.mark.unit
def test_large_insertion_echo_speaks_pasted_cursor_text():
large_insertion_module = _load_large_insertion_module()