pixel columns (#3052)

@ForLoveOfCats and I found a few speedups that make this acceptably fast
(able to update ~10k selections in <100ms), so the remaining work here
is to fix the tests, and then ship!

Release notes:
- Updated up/down to work based on pixel positions
([#1966](https://github.com/zed-industries/community/issues/1966))
([#759](https://github.com/zed-industries/community/issues/759))
- vim: Fixed off-by-one in visual block mode
([2123](https://github.com/zed-industries/community/issues/2123))
This commit is contained in:
Conrad Irwin 2023-10-20 15:01:27 -06:00 committed by GitHub
commit 0dae0f6027
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 981 additions and 436 deletions

View file

@ -590,7 +590,7 @@ impl Setting for VimModeSetting {
fn local_selections_changed(newest: Selection<usize>, cx: &mut WindowContext) {
Vim::update(cx, |vim, cx| {
if vim.enabled && vim.state().mode == Mode::Normal && !newest.is_empty() {
if matches!(newest.goal, SelectionGoal::ColumnRange { .. }) {
if matches!(newest.goal, SelectionGoal::HorizontalRange { .. }) {
vim.switch_mode(Mode::VisualBlock, false, cx);
} else {
vim.switch_mode(Mode::Visual, false, cx)