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

Jumplist entries are not updated on all views when applying transactions #4732

Closed
the-mikedavis opened this issue Nov 13, 2022 · 0 comments · Fixed by #4733
Closed

Jumplist entries are not updated on all views when applying transactions #4732

the-mikedavis opened this issue Nov 13, 2022 · 0 comments · Fixed by #4733
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@the-mikedavis
Copy link
Member

Summary

Each view has a jumplist which contains selections that live on a document. Since #4186, whenever a transaction (any sort of change) is applied to a document, we apply the transaction to the view as well and use it to update the jumplist selections. This keeps the selections up-to-date as a document changes and prevents panics that can happen when jumplist selections point out-of-bounds of the document (#2489).

#4186 only applies transactions to the currently focused view, though. If another view exists with jumplist entries for the same document, it is not updated by helix_view::apply_transaction. This can cause an incorrect jumplist entries or panics when multiple splits work with the same document.

Reproduction Steps

Save a selection to the Jumplist and delete that part of the text from another split:

<C-w>v10[<space><C-s><C-w>wvggd

Then switch to the window with the jumplist entry: <C-w>w. And then trigger the panic through either <C-o> or any change to the document, like d.

Helix log

No response

Platform

Linux

Terminal Emulator

Kitty 0.26.2

Helix Version

22.08.1 (fd585c1)

@the-mikedavis the-mikedavis added C-bug Category: This is a bug A-helix-term Area: Helix term improvements labels Nov 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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant