-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InputText CTRL+V paste fails if text is too long #7594
Comments
InputText
CTRL+V paste fails if text is too long
I don't think many other programs have limitations? Or you want to actually benefit from the clamped pasting? |
My case requires a hard limit of 500 characters, so for me clamping is the bigger benefit User can still paste their text without the text box just staying blank the moment it goes above 500 |
The ideal fix would requires reworking how calls to STB_TEXTEDIT_INSERTCHARS() are handled:
Another strategy which seems simpler if we perform a clamped call to |
One thing that makes me uneasy about clamping the pasted contents is if you paste from beginning or middle of an existing thing, then your pasted content would be cut off but the cut off is likely to be less visible. |
Version/Branch of Dear ImGui:
1.90.2 and before
Back-ends:
Win32 DirectX11
Compiler, OS:
MSVC, Windows 10
Full config/build information:
No response
Details:
Trying to paste a text with < 500 characters into a
InputText(label, string, 500)
will straight up fail, resulting in nothing be added.The behaviour of other programs is more of a cut-off at exactly 500 letters, and i wanted to recreate this.
Is it possible to achieve something similar with ImGui?
So:
InputText
Looked over the Callback events, there doesn't seem to be one handled through the InputText directly
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
No response
The text was updated successfully, but these errors were encountered: