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

[BUG] Repeating an edit command with dot (.) doesn't work in some situations #5122

Closed
schragge opened this issue Mar 13, 2024 · 2 comments
Closed
Labels

Comments

@schragge
Copy link

schragge commented Mar 13, 2024

Version of Kakoune

v2023.08.05-248-g4101e181

Reproducer

When solving the VimGolf challenge Increment number for every 10 lines and repeating the previous A with a dot (.) inside a macro:

j9JCCQA,<c-r>#<esc>kQ9qggQj9C.,Qqq<space>q

Another example is maximun and minimun.

It's not a practical solution (that would be %<a-s><a-!>jq min,max<ret>), but anyway:

O0<esc><a-o>4330o<c-r>#<esc>
%Q<a-m>Zs\d+<ret>*
[p<a-.>s<ret><c-s>
,yza<space><space><esc>p<c-o>
yz..p.a<lt><gt><esc>kQ39q
<a-.>d%<a-s><a-t>]&e&<space>q

Outcome

The dot command does nothing. In the second example, it works when defining the macro within Q...Q, but not when repeating it with q.

Introduced with dbe8528

Expectations

The dot command appends comma following by a number (1st example) resp. two spaces (2nd example)

Additional information

Probably related to #5120

@mawww
Copy link
Owner

mawww commented Mar 22, 2024

I think this should be fixed by 6598d7b can you confirm ?

@schragge
Copy link
Author

No, unfortunately, that commit indeed fixed the crash, but didn't fix the dot problem. Moreover, I'm now seeing another strange behavior, perhaps unrelated: when selecting a series of numbers with s\d+<ret>, stand-alone zeros don't get selected. E.g.

c1 2 0 3<esc>xs\d<ret>

@mawww mawww closed this as completed in 6e4bb5f Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants