Skip to content

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

Closed
@the-mikedavis

Description

@the-mikedavis

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-helix-termArea: Helix term improvementsC-bugCategory: This is a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions