[ play ] improvements to unicode completion
This commit is contained in:
@@ -11,5 +11,8 @@ export const ABBREV: Record<string, string> = {
|
||||
"\\>": "⟩",
|
||||
"\\_0": "₀",
|
||||
"\\_1": "₁",
|
||||
"\\_2": "₂",
|
||||
"\\_3": "₃",
|
||||
"\\neg": "¬",
|
||||
"\\bN": "ℕ"
|
||||
};
|
||||
|
||||
@@ -32,9 +32,9 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
|
||||
const lastChange = changes[changes.length - 1];
|
||||
const text = lastChange.text;
|
||||
|
||||
console.log("lastChange", lastChange)
|
||||
// Check if the last change is a potential shortcut trigger
|
||||
if (!text || !" ')\\".includes(text)) return;
|
||||
if (!text || !( " ')\\".includes(text) || text.startsWith('\n'))) return;
|
||||
|
||||
const document = editor.document;
|
||||
const position = lastChange.range.end;
|
||||
|
||||
Reference in New Issue
Block a user