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

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

Open
d7sd6u opened this issue Sep 13, 2024 · 0 comments
Open

Comments

@d7sd6u
Copy link

d7sd6u commented Sep 13, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant