mirror of
https://github.com/odrling/Aegisub
synced 2025-04-11 22:56:02 +02:00
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…
x
Reference in New Issue
Block a user