Skip to content

selections.restore.withCurrent reverse=true doesn't work how it should #348

@d7sd6u

Description

@d7sd6u

OS: NixOS 24.05
VSCode: VSCodium 1.91.1
Dance Version: 0.5.15001

It seems that selections.restore.withCurrent reverse=true doesn't work. Behaviour of <a-Z> is the same as of <a-z>, while in Kakoune it is different: <a-Z> executes the combine operator on current selections and register selections and stores the result back to register without ever changing current selections. I find this command very useful for interactive selection editing, hence this bug is slightly annoying.

Looking at the sourcecode of the implementation it seems that reverse flag just swaps the selection arrays on which combine operations work - but all the operations are symmetric! union, intersection, longest/shortest, leftmost/rightmost - all of them don't care: f(a,b) = f(b,a)!

It is possible to emulate the desired behaviour using custom registers, but it would be nice to have proper implementation by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions