fix REPL tab key behaviour

pull/1923/head
Richard Harris 6 years ago
parent bd5ac197c7
commit 519d91a896

2
package-lock.json generated

@ -1,6 +1,6 @@
{
"name": "svelte",
"version": "3.0.0-alpha6",
"version": "3.0.0-alpha12",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

@ -120,7 +120,7 @@
editor.toTextArea();
}
editor = CodeMirror.fromTextArea(refs.editor, {
const opts = {
lineNumbers,
lineWrapping: true,
indentWithTabs: true,
@ -130,12 +130,15 @@
mode: modes[mode] || {
name: mode
},
readOnly: readonly,
extraKeys: {
Tab: tab,
'Shift-Tab': tab
}
});
readOnly: readonly
};
if (!tab) opts.extraKeys = {
Tab: tab,
'Shift-Tab': tab
};
editor = CodeMirror.fromTextArea(refs.editor, opts);
editor.on('change', instance => {
if (!updating) {

Loading…
Cancel
Save