Skip space characters properly in CTextLogger

This commit is contained in:
Kawe Mazidjatari 2022-06-20 13:23:38 +02:00
parent f52bfb139e
commit 7d749fc53a

View File

@ -384,13 +384,12 @@ CTextLogger::Coordinates CTextLogger::FindWordEnd(const Coordinates & aFrom) con
if (prevspace != !!isspace(c))
{
if (isspace(c))
while (cindex < (int)line.size() && isspace(line[cindex].m_Char))
while (cindex < (int)line.size() && !isspace(line[cindex].m_Char))
++cindex;
break;
}
cindex += d;
}
cindex--;
return Coordinates(aFrom.m_nLine, GetCharacterColumn(aFrom.m_nLine, cindex));
}