diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-11-20 17:30:28 +0800 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-11-20 17:30:28 +0800 |
| commit | b57a53dfbf1aa5732ac6af5ad18348ea35939b84 (patch) | |
| tree | 668e299b1a18b5f5b862eaffd8d94caca9a056a2 /src | |
| parent | bf222a06284e6a72e6720cbe4a3761784e65115a (diff) | |
| parent | 62912c6586522efe0d9c191c40ae3e1cc81b3346 (diff) | |
Merge remote-tracking branch 'Delapouite/common_prefix'
Diffstat (limited to 'src')
| -rw-r--r-- | src/input_handler.cc | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc index efffcc30..a682215e 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -667,24 +667,6 @@ private: LineEditor m_filter_editor; }; -String common_prefix(ConstArrayView<String> strings) -{ - String res; - if (strings.empty()) - return res; - res = strings[0]; - for (auto& str : strings) - { - ByteCount len = std::min(res.length(), str.length()); - ByteCount common_len = 0; - while (common_len < len and str[common_len] == res[common_len]) - ++common_len; - if (common_len != res.length()) - res = res.substr(0, common_len).str(); - } - return res; -} - static Optional<Codepoint> get_raw_codepoint(Key key) { if (auto cp = key.codepoint()) |
