-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Undo don't work after full search and replace #1589
Comments
I can't replicate this exact issue. Could you explain it a bit more on what you're doing? (Did you just open up a file, etc.) I can only replicate a similar issue where multiple search and replaces followed by an undo undoes all of the search and replaces. |
It's wierd because sometimes it works and sometimes doesn't... |
@Matheus-de-Souza Does it have to do with how many matches you have? Like, does it work for small files but not large ones? |
I can replicate this consistently with any find and replace that matches more than about 23 words. |
This is fixed with the new "enableNeovim" option (on master). |
@johnfn I have a question. This issue is still present, but I know the cause (but not the reasoning). The issue is that when you undo, only the last 50 changes are kept, due to this line: https://github.com/VSCodeVim/Vim/blob/master/package.json#L448 combined with this line: https://github.com/VSCodeVim/Vim/blob/master/src/history/historyTracker.ts#L414 Is there any reason we have that line? Setting that line to something super high fixes all of these issues. |
@Chillee sorry for slow response. notification spam makes it hard to find important things to respond to. I honestly have no clue why that was added. It appears to be an incorrect overloading of the vim.history setting, which i think was initially added to track the number of SEARCH items (and maybe ex commands?) to store. I can't imagine why you'd want to truncate the undo history, that seems like a recipe for sadness. I'm fine with changing it back! |
The VSCodeVim team prioritizes issues based on reaction count.
What did you do?
[On Normal Mode]
:%s/pedido/perfil/gi [enter] u
I did a full search and replace, but I typed bad the last part of the expression. I should type 'gI' not 'gi'
Then I tried to undo, but it did not work.
What did you expect to happen?
I expect a "undo"
What happened instead?
Nothing
Technical details:
The text was updated successfully, but these errors were encountered: