We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 305e801 commit dd6af3dCopy full SHA for dd6af3d
1 file changed
src/rime/dict/dictionary.cc
@@ -131,11 +131,12 @@ bool DictEntryIterator::FindNextEntry() {
131
if (++chunk.cursor >= chunk.size) {
132
++chunk_index_;
133
}
134
- else {
135
- // reorder chunks since the current chunk has got a new head element
136
- Sort();
+ if (exhausted()) {
+ return false;
137
138
- return !exhausted();
+ // reorder chunks to move the one with the best entry to head
+ Sort();
139
+ return true;
140
141
142
bool DictEntryIterator::Next() {
0 commit comments