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

Macro doesnt stop at failed actions like failed search #4

Open
TheResplandor opened this issue May 14, 2018 · 2 comments
Open

Macro doesnt stop at failed actions like failed search #4

TheResplandor opened this issue May 14, 2018 · 2 comments
Assignees
Labels
bug Something isn't working upstream

Comments

@TheResplandor
Copy link

TheResplandor commented May 14, 2018

situation:
you have a macro that searches for bar and replaces it with foo. basically clicks: /barcefoo
you use it on a file that doesnt have the word foo in it.

Expected (pure-vim behavior):
the macro stops after the seach fails.

Current behavior:
the macro fails the search but continues till its end (clicks cefoo)

A failed search in atom does this small fail sound, so i assume some event is triggered, so i guess this is possible to implement.

@calebmeyer calebmeyer self-assigned this May 14, 2018
@calebmeyer calebmeyer added the bug Something isn't working label May 14, 2018
@calebmeyer
Copy link
Owner

Search is a hard problem. I'm working on it in the fix-search branch, but it's not easy to capture the characters you're typing while searching. I'll keep this issue up to date with what I find out.

@calebmeyer
Copy link
Owner

Okay, I've looked into this some more. It appears that the search command is returning a Promise, but it always gets resolved, and always with the value [undefined] (an array containing a single element, undefined).

I'm not sure of a non-hacky way to do this, at this point. @t9md might know of a better solution, or at least what would need to be done to support this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

No branches or pull requests

2 participants