diff --git a/Libraries/LibLine/Editor.cpp b/Libraries/LibLine/Editor.cpp index 9ca7547f87..8d73fc818a 100644 --- a/Libraries/LibLine/Editor.cpp +++ b/Libraries/LibLine/Editor.cpp @@ -919,7 +919,7 @@ void Editor::handle_read_event() // Disable our own notifier so as to avoid interfering with the search editor. m_notifier->set_enabled(false); - m_search_editor = Editor::construct(Configuration { Configuration::Eager, m_configuration.split_mechanism }); // Has anyone seen 'Inception'? + m_search_editor = Editor::construct(Configuration { Configuration::Eager }); // Has anyone seen 'Inception'? add_child(*m_search_editor); m_search_editor->on_display_refresh = [this](Editor& search_editor) { @@ -1638,19 +1638,6 @@ String Editor::line(size_t up_to_index) const return builder.build(); } -bool Editor::should_break_token(Vector& buffer, size_t index) -{ - switch (m_configuration.split_mechanism) { - case Configuration::TokenSplitMechanism::Spaces: - return buffer[index] == ' '; - case Configuration::TokenSplitMechanism::UnescapedSpaces: - return buffer[index] == ' ' && (index == 0 || buffer[index - 1] != '\\'); - } - - ASSERT_NOT_REACHED(); - return true; -}; - void Editor::remove_at_index(size_t index) { // See if we have any anchored styles, and reposition them if needed. diff --git a/Libraries/LibLine/Editor.h b/Libraries/LibLine/Editor.h index 250f33a464..d9dd563747 100644 --- a/Libraries/LibLine/Editor.h +++ b/Libraries/LibLine/Editor.h @@ -52,10 +52,6 @@ namespace Line { struct Configuration { - enum TokenSplitMechanism { - Spaces, - UnescapedSpaces, - }; enum RefreshBehaviour { Lazy, Eager, @@ -79,11 +75,9 @@ struct Configuration { } void set(RefreshBehaviour refresh) { refresh_behaviour = refresh; } - void set(TokenSplitMechanism split) { split_mechanism = split; } void set(OperationMode mode) { operation_mode = mode; } RefreshBehaviour refresh_behaviour { RefreshBehaviour::Lazy }; - TokenSplitMechanism split_mechanism { TokenSplitMechanism::Spaces }; OperationMode operation_mode { OperationMode::Unset }; }; @@ -302,8 +296,6 @@ private: m_suggestion_display->set_origin(row, col, {}); } - bool should_break_token(Vector& buffer, size_t index); - void recalculate_origin(); void reposition_cursor(bool to_end = false); diff --git a/Shell/main.cpp b/Shell/main.cpp index 8434548e8d..6c279ba488 100644 --- a/Shell/main.cpp +++ b/Shell/main.cpp @@ -144,7 +144,7 @@ int main(int argc, char** argv) } #endif - editor = Line::Editor::construct(Line::Configuration { Line::Configuration::UnescapedSpaces }); + editor = Line::Editor::construct(Line::Configuration {}); auto shell = Shell::construct(); s_shell = shell.ptr();