hsnips
hsnips copied to clipboard
Undoing breaks the context
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:
- Snippets with the math context do not expand outside math mode.
- Type dm.
- Undo.
- Snippets with the math context expand anywhere.
Sorry if this isn't really a bug; I have no idea what is at fault here.
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