MCPcopy Create free account
hub / github.com/Exafunction/codeium-chrome / editorHook

Method editorHook

src/codemirrorInject.ts:20–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18 }
19
20 editorHook(): (editor: CodeMirror.Editor) => void {
21 const hook = this.codeMirrorManager.clearCompletionInitHook();
22 return (editor) => {
23 if (this.hookedEditors.has(editor)) {
24 return;
25 }
26 this.hookedEditors.add(editor);
27 this.addKeydownListener(editor, this.multiplayer);
28 hook(editor);
29 };
30 }
31
32 addKeydownListener(editor: CodeMirror.Editor, multiplayer: boolean) {
33 const el = editor.getInputField().closest('.CodeMirror');

Callers 2

constructorMethod · 0.95
script.tsFile · 0.80

Calls 2

addKeydownListenerMethod · 0.95

Tested by

no test coverage detected