mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-07 18:17:23 +00:00
Shell: Allow to parse command interactively when hitting Enter key
This commit is contained in:
parent
927dc1f02a
commit
e6c363ac63
Notes:
sideshowbarker
2024-07-17 06:33:00 +09:00
Author: https://github.com/hanaa12G
Commit: e6c363ac63
Pull-request: https://github.com/SerenityOS/serenity/pull/21885
Issue: https://github.com/SerenityOS/serenity/issues/21884
1 changed files with 1 additions and 1 deletions
|
@ -2149,7 +2149,7 @@ bool Shell::has_history_event(StringView source)
|
||||||
void Shell::setup_keybinds()
|
void Shell::setup_keybinds()
|
||||||
{
|
{
|
||||||
m_editor->register_key_input_callback('\n', [this](Line::Editor& editor) {
|
m_editor->register_key_input_callback('\n', [this](Line::Editor& editor) {
|
||||||
auto ast = parse(editor.line(), false);
|
auto ast = parse(editor.line(), m_is_interactive);
|
||||||
if (ast && ast->is_syntax_error() && ast->syntax_error_node().is_continuable())
|
if (ast && ast->is_syntax_error() && ast->syntax_error_node().is_continuable())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue