mirror of https://github.com/pyodide/pyodide.git
FIX REPL tab at beginning of line should indent not complete (#2125)
This commit is contained in:
parent
8323987b39
commit
50938f3797
|
@ -36,6 +36,9 @@ substitutions:
|
|||
improved with some context information.
|
||||
{pr}`2121`
|
||||
|
||||
- {{Enhancement}} Pressing TAB in REPL no longer triggers completion when input
|
||||
is whitespace. {pr}`2125`
|
||||
|
||||
## Version 0.19.0
|
||||
|
||||
_January 10, 2021_
|
||||
|
|
|
@ -133,6 +133,15 @@
|
|||
term.set_command("");
|
||||
term.set_prompt(ps1);
|
||||
},
|
||||
"TAB": (event, original) => {
|
||||
const command = term.before_cursor();
|
||||
// Disable completion for whitespaces.
|
||||
if (command.trim() === "") {
|
||||
term.insert("\t");
|
||||
return false;
|
||||
}
|
||||
return original(event);
|
||||
}
|
||||
},
|
||||
});
|
||||
window.term = term;
|
||||
|
|
Loading…
Reference in New Issue