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

shrink_selection breaks when expand_selection is used on a different document in the same view #6087

Open
gibbz00 opened this issue Feb 23, 2023 · 0 comments · May be fixed by #6198
Open

shrink_selection breaks when expand_selection is used on a different document in the same view #6087

gibbz00 opened this issue Feb 23, 2023 · 0 comments · May be fixed by #6198
Labels
C-bug Category: This is a bug

Comments

@gibbz00
Copy link
Contributor

gibbz00 commented Feb 23, 2023

Summary

Introduced in #1340

Not linking the selection change to a document leads to broken behavior.

Say expand_selection is used on the current document, and then again on another document in the same view,
If shrink_selection is used on the original document, then the wrong selection will be popped from
view.object_selections. The resulting behavior is usually that shrink_selection stops working on the original document.

Also, not linking it to the document will in no way free the selection memory when the document is closed, which I presume is a memory leak. Guess desired behavior if document is reopened anyways.

Reproduction Steps

asciicast

Jittering and weird color/characters is only on the asciinema. Not visible on my screen during recording nor normal use of helix.

Helix log

No response

Platform

Linux

Terminal Emulator

foot

@gibbz00 gibbz00 added the C-bug Category: This is a bug label Feb 23, 2023
@gibbz00 gibbz00 mentioned this issue Feb 23, 2023
gibbz00 added a commit to gibbz00/helix that referenced this issue Feb 23, 2023
@dead10ck dead10ck linked a pull request Mar 6, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant