Files
zed/crates/vim/test_data
Peter Finn 5c0adde7bb Correct other end visual block functionality (#27678)
Closes #27385

Builds on #27604 so that `vim::OtherEnd` works in visual block mode.
This is accomplished by reversing the order of active selections in the
buffer when the user hit `o`, so that the cursor moves diagonally across
the selection. The current behavior is preserved for `shift-o`, which is
how the cursors behave in vim.

We'll close #27604 since this encapsulates that change, but if you'd
prefer to take only the visual block motion component, we'll keep the
branch for #27604 open.

Test case: growing a box down and to the right, other ending, followed
by growing and shrinking the box:


https://github.com/user-attachments/assets/1df544e1-efce-4354-b354-bbfec007a7df

Test case: growing a box up and to the left, other ending, followed by
growing and shrinking the box:


https://github.com/user-attachments/assets/2f6d7729-c63a-4486-960b-23474c2e507a



Release Notes:
- Improved visual block mode when cursor is at beginning of selection
- Improved visual block mode so that `o` and `shift-o` reach parity with
vim

---------

Co-authored-by: KyleBarton <kjbarton4@gmail.com>
2025-03-28 20:52:38 +00:00
..
2024-06-14 10:16:59 -06:00
2024-05-11 14:04:05 -04:00
2024-05-09 21:18:56 -06:00
2024-05-09 21:18:56 -06:00
2023-09-12 09:56:23 -06:00
2024-01-21 22:00:35 -07:00
2023-09-20 20:44:41 -06:00
2023-09-27 23:09:09 -06:00
2024-05-09 21:18:56 -06:00
2023-09-12 09:56:23 -06:00
2023-04-20 15:25:11 -06:00
2024-05-11 14:04:05 -04:00
2024-05-09 21:18:56 -06:00
2024-09-20 13:02:39 -06:00
2024-06-14 10:16:59 -06:00
2023-09-27 19:49:31 -06:00
2023-10-09 21:48:50 -06:00
2024-01-21 22:00:35 -07:00
2024-06-14 10:16:59 -06:00
2024-05-11 14:04:05 -04:00
2023-08-22 13:27:57 -06:00
2024-05-11 14:04:05 -04:00
2024-06-27 21:54:34 -06:00
2024-05-11 14:04:05 -04:00
2024-03-13 23:12:12 -06:00
2023-08-15 10:00:45 -06:00
2023-08-17 17:13:23 -06:00
2024-05-11 14:04:05 -04:00
2023-09-12 09:56:23 -06:00