Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hitting A-o stacks up "deselects" even though there is nothing more to select. #2714

Closed
helmesjo opened this issue Jun 8, 2022 · 1 comment · Fixed by #2760
Closed

Hitting A-o stacks up "deselects" even though there is nothing more to select. #2714

helmesjo opened this issue Jun 8, 2022 · 1 comment · Fixed by #2760
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors

Comments

@helmesjo
Copy link

helmesjo commented Jun 8, 2022

Summary

Hitting A-o stacks up "deselects" even though there is nothing more to select.

Reproduction Steps

  1. Open a file.
  2. Keep hitting A-o until whole file selected.
  3. At this moment, as many times as you keep hitting A-o (everything is already selected, so nothing happens visually), the same amount of times you need to hit A-i to "undo" it before you start seeing things deselect (it basically buffers up, even though there is nothing else to select).

Helix log

~/.cache/helix/helix.log

It generates no log output.

Platform

Linux

Terminal Emulator

Alacritty

Helix Version

20.05

@helmesjo helmesjo added the C-bug Category: This is a bug label Jun 8, 2022
@the-mikedavis the-mikedavis added the A-helix-term Area: Helix term improvements label Jun 8, 2022
@the-mikedavis
Copy link
Member

This should be a small fix: we just need to check if current_selection is the .last() of the view.object_selections vector, and if it is, don't .push the current_selection

// save current selection so it can be restored using shrink_selection
view.object_selections.push(current_selection.clone());

@the-mikedavis the-mikedavis added E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors labels Jun 8, 2022
sohnryang added a commit to sohnryang/helix that referenced this issue Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants