Avoid buffer end line in word_db update
This commit is contained in:
parent
0aa5c4e779
commit
95200d1de1
|
@ -92,6 +92,9 @@ void WordDB::update_db()
|
|||
// add words from new lines
|
||||
for (auto l = 0_line; l <= modif.num_added.line; ++l)
|
||||
{
|
||||
if (modif.new_coord.line + l >= buffer.line_count())
|
||||
break;
|
||||
|
||||
new_lines.push_back(get_words(buffer[modif.new_coord.line + l]));
|
||||
add_words(m_words, new_lines.back());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user