vim: Fix gr in visual mode (#25301)

Closes #25258

Release Notes:

- Fixed `gr` in visual mode
This commit is contained in:
0x2CA 2025-02-21 14:39:11 +08:00 committed by GitHub
parent c31c638006
commit 6b9397c380
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 0 deletions

View file

@ -849,6 +849,26 @@ mod test {
);
let clipboard: Register = cx.read_from_clipboard().unwrap().into();
assert_eq!(clipboard.text, "fish");
cx.set_state(
indoc! {"
ˇfish one
two three
"},
Mode::Normal,
);
cx.simulate_keystrokes("y i w");
cx.simulate_keystrokes("w");
cx.simulate_keystrokes("v i w g r");
cx.assert_state(
indoc! {"
fish fisˇh
two three
"},
Mode::Normal,
);
let clipboard: Register = cx.read_from_clipboard().unwrap().into();
assert_eq!(clipboard.text, "fish");
}
#[gpui::test]