Let ... in ... block is working

This commit is contained in:
Joeri Exelmans 2025-05-13 15:06:15 +02:00
parent f09261df93
commit 897824e07d
10 changed files with 28 additions and 24 deletions

View file

@ -26,7 +26,7 @@ interface EditorProps extends State2Props<EditorState> {
}
function getCommands(type) {
const commands = ['u', 't', 'Enter', 'Backspace', 'ArrowLeft', 'ArrowRight', 'Tab', 'l', '=', '.'];
const commands = ['e', 't', 'Enter', 'Backspace', 'ArrowLeft', 'ArrowRight', 'Tab', 'l', '=', '.'];
if (getSymbol(type) === symbolFunction) {
commands.push('c');
}
@ -82,7 +82,7 @@ export function Editor({state, setState, onResolve, onCancel, filter}: EditorPro
e.preventDefault();
setNeedCommand(false);
// u -> pass Up
if (e.key === "u" || e.key === "Enter" || e.key === "Tab" && !e.shiftKey) {
if (e.key === "e" || e.key === "Enter" || e.key === "Tab" && !e.shiftKey) {
onResolve(state);
globalContext?.doHighlight.eval();
return;