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

Live snippets break undo chains #404

Open
DrDragonite opened this issue Sep 22, 2024 · 0 comments
Open

Live snippets break undo chains #404

DrDragonite opened this issue Sep 22, 2024 · 0 comments

Comments

@DrDragonite
Copy link

Bug Report

Disable all the other extensions except for LaTeX Workshop and LaTeX Utilities, and check that you still see this issue.

You still see this issue?: Yes

Describe the bug

After a live snippet is activated and the text changed, the snippet activation cannot be practically undone as immediately after undoing, the snippet activates again.

This breaks the undo chain, as further undo actions just revert and reactivate the snippet, not allowing the user to reach earlier undo states.

To Reproduce

Steps to reproduce the behaviour:

Example 1:

[in math mode]

1. type vmat
2. ctrl + z (whole thing disappears)
3. ctrl + z (vmat snippet activates)

consecutive undo actions repeat step 2 and 3

Example 2:

[in math mode]

1. type sq
2. ctrl + z (whole thing disappears)
3. ctrl + z (sq snippet activates)

consecutive undo actions repeat step 2 and 3

Expected behaviour

After undoing a snippet activation, the program allows for undoing further into the undo chain.

Example:

Visible text:      sq    ->        \sqrt{}       ->    sq    -> [previously typed text]
User action:   Type "sq" -> [snippet activation] -> Ctrl + Z ->        Ctrl + Z

Logs

Please paste the whole log messages here, not parts of ones. It is very important to identify problems. If you think the logs are unrelated, please say so.

Unrelated

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop

  • OS: Windows 10
  • VS Code version: 1.39.1
  • Extension version: v0.4.14
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

1 participant