ImGui: fix right move

Ctrl + arrow should move to word end, not next word. This also fixes a bug where it would index into into the second character when the line end gets reached.
This commit is contained in:
Kawe Mazidjatari 2024-02-28 20:48:35 +01:00
parent 197772e5f7
commit dac0ab4d99

View File

@ -1239,7 +1239,7 @@ void CTextLogger::MoveRight(int aAmount, bool aSelect, bool aWordMode)
cindex += UTF8CharLength(line.buffer[cindex]);
m_State.m_CursorPosition = Coordinates(lindex, GetCharacterColumn(lindex, cindex));
if (aWordMode)
m_State.m_CursorPosition = FindNextWord(m_State.m_CursorPosition);
m_State.m_CursorPosition = FindWordEnd(m_State.m_CursorPosition);
}
}