-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Multiline text with ReadOnly can render incorrectly when text changes #8242
Comments
…rlying value is being modified. (#8242)
Thank you for your report and the repro, @bgribble and @pthom. I have pushed a first fix: e900571 which uses a bit of a "live dangerously" approach, and I then extended and improved that work and removed the "live dangerously" bit by introducing an internal TextSrc pointer in 32f1140 and ensuring all read only operations used it. Even though all tests are passing, statistically speaking I won't be surprised if this introduced a small issue somewhere. We will find out. |
…ut/imgui#8242 Many thanks to ocornut for his help!
Merci beaucoup Omar for your correction in a record time! I like to live dangerously sometimes also :-) @bgribble : the Python wheels will be available shortly here: https://github.com/pthom/imgui_bundle/actions/runs/12398172321 |
Thanks for letting me know! |
I updated the python side too. Thanks ! |
…rlying value is being modified. (ocornut#8242)
… buffer in text processing code. (ocornut#8242) Followup to e900571 Removed SetClipboardText() trick used in abd07f6 (ocornut#7925)
Version/Branch of Dear ImGui:
Version 1.91.5, via imgui_bundle
Back-ends:
SDL2
Compiler, OS:
Linux + python and c++
Full config/build information:
No response
Details:
I discovered this issue while working with ImGui Bundle in python. The full report with reproduction code in Python and C++, and a screencast of the behavior, is in pthom/imgui_bundle#295
My application uses an
InputTextMultiline
with theReadOnly
flag to implement an interactive REPL in the application. I made it ReadOnly so I can handle input myself, to implement app-specific keybindings for history navigation and editing.I observed that under some circumstances the InputTextMultiline would display spaces or nonprinting characters (appearing as ???) rather than the text that was passed to the widget. Clicking in a different Imgui window in the app would cause the text to appear as expected.
I discussed with Pascal Thomet and he believes that this might be a bug in Imgui, since the following simple C++ code demonstrates it.
Screenshots/Video:
v.mp4
Minimal, Complete and Verifiable Example code:
The text was updated successfully, but these errors were encountered: