-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fix old values shown in select_register
#5242
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will fix the display for registers that are being used like a stack but this doesn't makes sense for other registers. Kakoune's help for "
shows the docs for each register and special registers which is more helpful IMO.
If I remember correctly, the current behavior matches https://github.com/Delapouite/kakoune-registers/blob/master/registers.kak
Hmm I wasn't aware of any register with a How would you like the issue to be fixed if the proposed changes are not desired? Thanks in advance. |
You can yank multiple selections into a register. The current display is not really wrong: it's what you will get when you paste that register (with I think it could make sense to reverse the direction of the stack so that pushing operations push to the front and we always use the front element in search. This would diverge from Kakoune and we would probably want to change the datastructure used for storing values within the Register though. |
Ah I agree this makes the most sense.
Yeah inserting at the beginning of |
Hi. I'm a bit interested in this, so took a look into how registers work.
Given that the So my question is why does the (I came from NeoVim and not Kakoune. Sorry if I incorrectly understand registers or selections.) |
I haven't looked through the history but I think that note in the docs is just out of date. The search commands push new searches to the end of the The yank commands use registers differently: each range in a selection has its contents saved as an element in the register. |
Ah, got it.
Yeah. Hmm, so I'm not really sure, but it looks that the problem here is the inconsistency. Some registers (like the search register) have their values as history stacks, and others (like the yank register) have them simply to refer to multiple selections. So, changing the data structures. That makes sense. Thank you! |
Fixes #5241.