mirror of https://github.com/odrling/Aegisub
Fix word-boundary checking for edit box spellchecking
This commit is contained in:
parent
835f7c0f78
commit
24aef1ffef
|
@ -479,7 +479,7 @@ void SubsTextEditCtrl::OnSetThesLanguage(wxCommandEvent &event) {
|
|||
std::pair<int, int> SubsTextEditCtrl::GetBoundsOfWordAtPosition(int pos) {
|
||||
int len = 0;
|
||||
for (auto const& tok : tokenized_line) {
|
||||
if ((int)tok.length > pos) {
|
||||
if (len + (int)tok.length > pos) {
|
||||
if (tok.type == agi::ass::DialogueTokenType::WORD)
|
||||
return std::make_pair(len, tok.length);
|
||||
return std::make_pair(0, 0);
|
||||
|
|
Loading…
Reference in New Issue