-
Notifications
You must be signed in to change notification settings - Fork 221
fix: builtin find not working with dot repeat #622
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
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.
I tested this and can confirm that it works as expected.
@sahinakkaya Thanks for testing! Would it be possible to keep it in your config and try it for some time? Because the last thing we want to do is to ask all users to change their config only to see another issue that we have to roll back. |
Yeah, sure. I was already planning to keep it until this is merged. |
Also just tested it and can confirm it works :) |
@ribru17 I've also been using this and had no problem so far. Do you think it's ready to merge? |
If it applies cleanly to the |
@clason Yes it does, it's separated from the module structure. I can make a separate PR for the main branch if it's needed. I don't know if it can be just rebased as main branch has a little bit of refactoring. |
Rebasing would be preferred (also to keep |
I can rebase and make the PR. |
No, no need to make a PR -- just |
fixes #519
The current implementation of builtin
f
,F
,t
,T
is a re-implementation to match the behaviour of the nvim upstream. Although it works with;
and,
movement repeat, unfortunately it probably wouldn't work with complex combinations (e.g.dfe
and.
repeat wouldn't work).Instead, we can make
builtin_f_expr
,builtin_F_expr
, ... just returns"f"
,"F"
,"t"
,"T"
character so you can use it to map with{expr = true}
. See the implementation below. This will almost likely resemble the upstream behaviour in most of the situations.Before returning the string, note that it also maps the last movement so the
;
and,
mapping can handle it as well.Important: users must change their keybindings to include
{ expr = true }
. I updated the README.md as follows:The original functions
builtin_f
etc. are left unchanged, except it will notify the deprecation warning once.