diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2020-04-12 22:48:09 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-13 00:49:24 +0200 |
commit | 364dbe28d680f351e34aea5c87acab73a9f1a0e0 (patch) | |
tree | b44b294107190d064da35597df3c7e622e55dd9a /Libraries/LibLine | |
parent | fa0525b8bf4e093a7816aac4fb35129c6b90b354 (diff) | |
download | serenity-364dbe28d680f351e34aea5c87acab73a9f1a0e0.zip |
LibLine: Remove unused cut_mismatching_chars() function
This is superceded by the suggest() mechanism
Diffstat (limited to 'Libraries/LibLine')
-rw-r--r-- | Libraries/LibLine/Editor.cpp | 8 | ||||
-rw-r--r-- | Libraries/LibLine/Editor.h | 1 |
2 files changed, 0 insertions, 9 deletions
diff --git a/Libraries/LibLine/Editor.cpp b/Libraries/LibLine/Editor.cpp index dde601ad22..3e2854c7a6 100644 --- a/Libraries/LibLine/Editor.cpp +++ b/Libraries/LibLine/Editor.cpp @@ -118,14 +118,6 @@ void Editor::stylize(const Span& span, const Style& style) m_spans_ending.set(span.end(), ending_map); } -void Editor::cut_mismatching_chars(String& completion, const String& other, size_t start_compare) -{ - size_t i = start_compare; - while (i < completion.length() && i < other.length() && completion[i] == other[i]) - ++i; - completion = completion.substring(0, i); -} - String Editor::get_line(const String& prompt) { set_prompt(prompt); diff --git a/Libraries/LibLine/Editor.h b/Libraries/LibLine/Editor.h index a5817c83dc..4faed1febb 100644 --- a/Libraries/LibLine/Editor.h +++ b/Libraries/LibLine/Editor.h @@ -105,7 +105,6 @@ public: void clear_line(); void insert(const String&); void insert(const char); - void cut_mismatching_chars(String& completion, const String& other, size_t start_compare); void stylize(const Span&, const Style&); void strip_styles() { |