Skip to content

Commit 4d60cee

Browse files
committed
Homepage: fix Tab key in hero editor
1 parent 289f675 commit 4d60cee

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,7 @@ <h3>New to C++ Mode?</h3>
625625
heroEditor = CodeMirror(document.getElementById('hero-cm-wrap'), {
626626
mode: 'cppmode', theme: 'cppmode', lineNumbers: true,
627627
indentUnit: 2, tabSize: 2, lineWrapping: false,
628+
extraKeys: { Tab: function(cm) { cm.replaceSelection(' '); } },
628629
value: HERO_DEFAULT,
629630
});
630631
heroEditor.setSize('100%', '100%');

0 commit comments

Comments
 (0)