1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-03 11:53:38 +00:00

Shell: Allow to parse command interactively when hitting Enter key

This commit is contained in:
hanaa12G 2023-11-09 20:08:13 +07:00 committed by Ali Mohammad Pur
parent 927dc1f02a
commit e6c363ac63

View File

@ -2149,7 +2149,7 @@ bool Shell::has_history_event(StringView source)
void Shell::setup_keybinds()
{
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())
return true;