Filter non-extra_word_chars completion candidates using Codepoints
Fixes #3010
This commit is contained in:
parent
c2e43ee42c
commit
be3d0f8b33
|
@ -136,8 +136,11 @@ InsertCompletion complete_word(const SelectionList& sels,
|
|||
continue;
|
||||
for (auto& m : get_word_db(*buf).find_matching(prefix) |
|
||||
// filter out words that are not considered words for the current buffer
|
||||
filter([&](auto& rm) { return std::all_of(rm.candidate().begin(), rm.candidate().end(),
|
||||
is_word_pred); }))
|
||||
filter([&](auto& rm) {
|
||||
auto&& c = rm.candidate();
|
||||
return std::all_of(utf8::iterator{c.begin(), c},
|
||||
utf8::iterator{c.end(), c},
|
||||
is_word_pred); }))
|
||||
matches.push_back({ m, buf.get() });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
:e other<ret>iword░<esc><ret><c-o>A<c-x>W<c-n>
|
|
@ -0,0 +1 @@
|
|||
wo
|
|
@ -0,0 +1 @@
|
|||
word░
|
|
@ -0,0 +1 @@
|
|||
set global extra_word_chars ░
|
Loading…
Reference in New Issue
Block a user