diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2016-04-09 07:57:55 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2016-04-09 07:57:55 +0100 |
| commit | c51ca6b3faffd6310bd1d44e9e05800cc4540015 (patch) | |
| tree | 75dbf24734aaba611a806c4530c75b3d34ba07e1 /src/insert_completer.cc | |
| parent | c768ff9b6f025ac656cebb5c98de84959203a2ff (diff) | |
Fix is_word ambiguous overload
Diffstat (limited to 'src/insert_completer.cc')
| -rw-r--r-- | src/insert_completer.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/insert_completer.cc b/src/insert_completer.cc index 878056b9..ba77e515 100644 --- a/src/insert_completer.cc +++ b/src/insert_completer.cc @@ -89,9 +89,10 @@ InsertCompletion complete_word(const SelectionList& sels, const OptionManager& o IdMap<int> sel_word_counts; for (int i = 0; i < sels.size(); ++i) { - auto end = Utf8It{buffer.iterator_at(sels[i].cursor()), buffer}; - auto begin = end-1; - if (not skip_while_reverse(begin, buffer.begin(), is_word)) + Utf8It end{buffer.iterator_at(sels[i].cursor()), buffer}; + Utf8It begin = end-1; + if (not skip_while_reverse(begin, buffer.begin(), + [](Codepoint c) { return is_word(c); })) ++begin; if (i == sels.main_index()) @@ -100,7 +101,7 @@ InsertCompletion complete_word(const SelectionList& sels, const OptionManager& o prefix = buffer.string(word_begin, end.base().coord()); } - skip_while(end, buffer.end(), is_word); + skip_while(end, buffer.end(), [](Codepoint c) { return is_word(c); }); auto word = buffer.string(begin.base().coord(), end.base().coord()); ++sel_word_counts[word]; |
