In a Py-Repl, Shift Enter Shouldn't Insert Newline (#1094)

* Prevent shift-enter adding newlines in Py-Repl

* Add test
This commit is contained in:
Jeff Glass
2023-01-04 12:26:46 -06:00
committed by GitHub
parent 412da2de08
commit 77d98a565e
2 changed files with 5 additions and 2 deletions

View File

@@ -68,8 +68,8 @@ export function make_PyRepl(runtime: Runtime) {
languageConf.of(python()),
keymap.of([
...defaultKeymap,
{ key: 'Ctrl-Enter', run: this.execute.bind(this) },
{ key: 'Shift-Enter', run: this.execute.bind(this) },
{ key: 'Ctrl-Enter', run: this.execute.bind(this), preventDefault: true },
{ key: 'Shift-Enter', run: this.execute.bind(this), preventDefault: true },
]),
];