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

[feature request]: update active diff instantly when rewrite has changed #285

Open
alexzhang1030 opened this issue Apr 19, 2024 · 3 comments

Comments

@alexzhang1030
Copy link
Contributor

Currently, ast-grep-vscode will close all opened diff tabs when the rewrite has changed. We can follow the behavior of vscode-search to get a better UX.

Area.mp4
@HerringtonDarkholme
Copy link
Member

It can be done but the behavior is not similar to VSCode.
VSCode replacement is computed inside JavaScript while ast-grep replacement is done via spawning new commands.

Supporting this will trigger a lot of processes when changing replacement.

@alexzhang1030
Copy link
Contributor Author

How about updating the active diff content whenever the item is rerendered? (Rerendering refers to re-searching or changes in input/replacement.)

@alexzhang1030
Copy link
Contributor Author

This will prevent the initiation of new processes by calculating active item diffs. Updating the diff content will be lazy, yet intuitive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants