hsnips icon indicating copy to clipboard operation
hsnips copied to clipboard

Undoing breaks the context

Open ZornHadNoChoice opened this issue 7 months ago • 1 comments

function math(context) {
    return  context.scopes.findLastIndex(s => s.startsWith("meta.math")) > context.scopes.findLastIndex(s => s.startsWith("comment") || s.startsWith("meta.text.normal.tex"));
}

The math context above (taken from VSCode-LaTeX-Inkscape) breaks when I type dm (the snippet for \[\]) then undo it:

  1. Snippets with the math context do not expand outside math mode.
  2. Type dm.
  3. Undo.
  4. Snippets with the math context expand anywhere.

Sorry if this isn't really a bug; I have no idea what is at fault here.

ZornHadNoChoice avatar Sep 03 '25 19:09 ZornHadNoChoice

This is a bug with the hscopes extension not updating, not with the hsnips extension. Idk how to fix it yet because I haven't looked into it

XRay71 avatar Sep 25 '25 13:09 XRay71