Allow typing space in workspace::SendKeystrokes (#8288)

Fixes #8222

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2024-02-23 10:40:12 -07:00 committed by GitHub
parent b0872b5b57
commit 3bc7cd66b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 43 additions and 12 deletions

View file

@ -950,4 +950,16 @@ async fn test_remap(cx: &mut gpui::TestAppContext) {
cx.set_state("ˇ1234\n56789", Mode::Normal);
cx.simulate_keystrokes(["g", "u"]);
cx.assert_state("1234 567ˇ89", Mode::Normal);
// test leaving command
cx.update(|cx| {
cx.bind_keys([KeyBinding::new(
"g t",
workspace::SendKeystrokes("i space escape".to_string()),
None,
)])
});
cx.set_state("12ˇ34", Mode::Normal);
cx.simulate_keystrokes(["g", "t"]);
cx.assert_state("12ˇ 34", Mode::Normal);
}