sirgienko added a comment.
In D23061#509851 <https://phabricator.kde.org/D23061#509851>, @cullmann wrote: > Hmm, I think we want an unit test for this, too. > And I think it won't work like it is, before the call to initLookupForCaseSensitivity one needs to clear both m_keywordsSortedCaseSensitive and m_keywordsSortedCaseInsensitive vectors. Yes, I have forgotten, that `reserve` don't clear `std::vector`. But, considering this, is realization of `initLookupForCaseSensitivity` correct? I mean, inside `initLookupForCaseSensitivity` are used `reserve` and `push_back`. So, if I will call `initLookupForCaseSensitivity` twice, I will have `m_keywordsSortedCaseSensitive` (for example) with duplicatesof keywords, right? REPOSITORY R216 Syntax Highlighting REVISION DETAIL https://phabricator.kde.org/D23061 To: sirgienko, dhaumann, cullmann, vkrause Cc: kwrite-devel, kde-frameworks-devel, univerz, LeGast00n, gennad, bmortimer, domson, michaelh, genethomas, ngraham, bruns, demsking, cullmann, vkrause, sars, dhaumann