Skip to content

Commit

Permalink
Handle execution of commands not implemented (#690)
Browse files Browse the repository at this point in the history
* prevent endless recursion on missing commands

* alert on executing cmd not implemented
  • Loading branch information
e9gille authored Apr 30, 2021
1 parent 9a98f8d commit a1e6066
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion src/km.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@
const c = D.commands;
c[x] || (c[x] = (me) => {
const h = me.dyalogCmds;
h && h.execCommand(x);
(h && h[x]) ? h.execCommand(x) : $.alert(`Command ${x} not implemented.`);
});
}
('CBP MA AC VAL indentOrComplete indentMoreOrAutocomplete STL TVO TVB'
Expand Down
13 changes: 0 additions & 13 deletions src/se.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,19 +433,6 @@
const fs = D.zoom2fs[z + 10];
me.updateOptions({ fontSize: fs, lineHeight: fs + 2 });
me.revealRangeAtTop(r);

// const w = this;
// const b = w.getDocument().body;
// const top = w.cm.heightAtLine(w.cm.lastLine(), 'local') < w.btm;
// const i = w.cm.getScrollInfo();
// const line = w.cm.lineAtHeight(top ? i.top : w.btm, 'local');
// const diff = w.btm - (line * w.cm.defaultTextHeight());
// const ch = i.clientHeight;
// const cls = b.className.split(/\s+/).filter(s => !/^zoom-?\d+$/.test(s)).join(' ');
// b.className = `zoom${z} ${cls}`;
// w.refresh();
// w.btm = (w.cm.defaultTextHeight() * line) + (top ? ch + 5 : diff) +
// (w.cm.getScrollInfo().clientHeight - ch);
},

ValueTip(x) {
Expand Down

0 comments on commit a1e6066

Please sign in to comment.