Pygame-CE version: 2.5.7
When input in IME mode, event.start will be wrongly set to len(event.text) in follow cases:
- delete the first char in IME mode
a)press same char in IME mode
b)press left, let the start is 1
c)press backspace to delete first char
expected: new TEXTEDITING event with start 0 or -1
actual: new TEXTEDITING event with len(text)
- when the start is 1, press left
a)press same char in IME mode
b)press left, let the start is 1
c)press left again
expected: new TEXTEDITING event with start 0 or -1
actual: new TEXTEDITING event with len(text)
Workarounds:
for case 1, the text in new event is shorter than previous event, so we can detect this case
for case 2, when text is more than 2 chars, when event.start switch from 1 to len(text), we can detect; but it there is only 2 chars typed in IME mode, we cannot detect it is pressing left or right.
Pygame-CE version: 2.5.7
When input in IME mode, event.start will be wrongly set to len(event.text) in follow cases:
a)press same char in IME mode
b)press left, let the start is 1
c)press backspace to delete first char
expected: new TEXTEDITING event with start 0 or -1
actual: new TEXTEDITING event with len(text)
a)press same char in IME mode
b)press left, let the start is 1
c)press left again
expected: new TEXTEDITING event with start 0 or -1
actual: new TEXTEDITING event with len(text)
Workarounds:
for case 1, the text in new event is shorter than previous event, so we can detect this case
for case 2, when text is more than 2 chars, when event.start switch from 1 to len(text), we can detect; but it there is only 2 chars typed in IME mode, we cannot detect it is pressing left or right.