Fix vim selection to include entire range (#2787)

Update vim mode to have vim selection and editor selections match.
Before this we had to adjust between vim selections and real selections
when making changes; now we have to adjust when making selections.

Release Notes:

- vim: Ensure editor selection matches the vim selection
([#1796](https://github.com/zed-industries/community/issues/1796)).
- vim: Fix `s` in visual line mode
- vim: Add `o` and `shift-o` to toggle direction of visual selection
- vim: Fix `v` and `shift-v` to toggle back to normal mode
- vim: Fix block selections like `vi}` to contain correct whitespace
This commit is contained in:
Conrad Irwin 2023-08-15 08:36:17 -06:00 committed by GitHub
commit 404b1aa65a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 1007 additions and 454 deletions

View file

@ -141,7 +141,7 @@ async fn test_indent_outdent(cx: &mut gpui::TestAppContext) {
// works in visuial mode
cx.simulate_keystrokes(["shift-v", "down", ">"]);
cx.assert_editor_state("aa\n b«b\n cˇ»c");
cx.assert_editor_state("aa\n b«b\n ccˇ»");
}
#[gpui::test]