InputText: do not require anymore that CursorPos be clamped by user code. (#9029)

Add clamping outside of callback code + simplify logic. The previous logic checking for difference was because old code e.g. 21d03edcb0 required a ImTextCountCharsFromUtf8() which is not required since #7925.
This commit is contained in:
ocornut
2025-10-23 18:54:32 +02:00
parent e571ccf3f4
commit 750c5d2a61
2 changed files with 8 additions and 5 deletions
+2
View File
@@ -49,6 +49,8 @@ Other Changes:
EndTable() was mistakenly restoring a wrong current table.
- InputText: avoid continuously overwriting ownership of ImGuiKey_Enter/_KeypadEnter
keys in order to allow e.g. external Shortcut override behavior. (#9004)
- InputText: when using a callback to reduce/manipulate the value of BufTextLen,
we do not require anymore that CursorPos be clamped by user code. (#9029)
- InputTextMultiline: fixed a crash when using ImGuiInputTextFlags_WordWrap and
resizing the parent window while keeping the multi-line field active (which is
most typically achieved when resizing programmatically or via a docking layout