Skip to content

Commit

Permalink
(docs) remove onCommandChange from terminal monkey patch
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Oct 11, 2024
1 parent b5716ae commit aa63e5b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions docs/src/components/Interpreter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,10 @@ const replReady = () => {

// monkey patch keymap added by LIPS terminal
function trackCommands(term: JQueryTerminal) {
let command: string;
term.option('onCommandChange', (cmd: string) => {
command = cmd;
});
const ENTER = term.cmd().keymap('ENTER');
term.cmd().keymap('ENTER', function(e: KeyboardEvent, orig: () => any) {
const _paq = globalThis._paq as PiwikTrack;
const command = term.get_command();
_paq.push(['trackEvent', 'REPL', 'command', command]);
return ENTER(e, orig);
});
Expand Down

0 comments on commit aa63e5b

Please sign in to comment.