-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Undo/Redo stack is not cleared when re-focusing the same InputText #3008
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
Labels
Comments
rokups
added a commit
to rokups/imgui
that referenced
this issue
Feb 3, 2020
rokups
added a commit
to rokups/imgui
that referenced
this issue
Feb 3, 2020
rokups
added a commit
to rokups/imgui
that referenced
this issue
Feb 3, 2020
…estore original value. This makes restoration undoable using hotkeys. Fixes ocornut#3008.
rokups
added a commit
to rokups/imgui
that referenced
this issue
Feb 3, 2020
…estore original value. This makes restoration undoable using hotkeys. Fixes ocornut#3008.
rokups
added a commit
to rokups/imgui
that referenced
this issue
Feb 3, 2020
…estore original value. This makes restoration undoable using hotkeys. Fixes ocornut#3008.
rokups
added a commit
to rokups/imgui
that referenced
this issue
Feb 3, 2020
…estore original value. This makes restoration undoable using hotkeys. Fixes ocornut#3008.
rokups
added a commit
to rokups/imgui
that referenced
this issue
Feb 3, 2020
…estore original value. This makes restoration undoable using hotkeys. Fixes ocornut#3008.
rokups
added a commit
to rokups/imgui
that referenced
this issue
Feb 3, 2020
…estore original value. This makes restoration undoable using hotkeys. Fixes ocornut#3008.
rokups
added a commit
to rokups/imgui
that referenced
this issue
Feb 3, 2020
…estore original value. This makes restoration undoable using hotkeys. STB change also fixes paste operation creating two entries in undo stack. Fixes ocornut#3008.
rokups
added a commit
to rokups/imgui
that referenced
this issue
Feb 3, 2020
…estore original value. This makes restoration undoable using hotkeys. STB change also fixes paste operation creating two entries in undo stack. Fixes ocornut#3008.
rokups
added a commit
to rokups/imgui
that referenced
this issue
Feb 3, 2020
…estore original value. This makes restoration undoable using hotkeys. STB change also fixes paste operation creating two entries in undo stack. Fixes ocornut#3008.
rokups
added a commit
to rokups/imgui
that referenced
this issue
Feb 3, 2020
…estore original value. This makes restoration undoable using hotkeys. STB change also fixes paste operation creating two entries in undo stack. Fixes ocornut#3008.
rokups
added a commit
to rokups/imgui
that referenced
this issue
Feb 3, 2020
…estore original value. This makes restoration undoable using hotkeys. Fixes ocornut#3008.
rokups
added a commit
to rokups/imgui
that referenced
this issue
Feb 3, 2020
…estore original value. This makes restoration undoable using hotkeys. Fixes ocornut#3008.
rokups
added a commit
to rokups/imgui
that referenced
this issue
Feb 3, 2020
…estore original value. This makes restoration undoable using hotkeys. Fixes ocornut#3008.
ocornut
added a commit
that referenced
this issue
Feb 3, 2020
Hello @elvissteinjr , |
ocornut
added a commit
that referenced
this issue
May 25, 2022
…revert after a deletion would lead to small garbage being displayed for one frame. (#3008) Curiously very old, amend 83efdce and bdbb2b2. Using stb_ functions updated ->CurLenA without updating ->TextA, leading to `buf_display_end = buf_display + state->CurLenA;` in the display. Since f3ab5e6 they are 1 case out of 4 which didn't apply back to ->TextA and this is essentially the one where we ensure appliance. Another solution would be to alter the lower display code, but applying to TextA makes things more consistent.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version/Branch of Dear ImGui:
Version: 1.74
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_win32.cpp + imgui_impl_dx11.cpp
Compiler: MSVC19
Operating System: Windows 10
My Issue/Question:
If you type into an InputText (any variant), cancel by pressing ESC and then re-focus the input field (e.g. by clicking into it) again before any other InputText, the undo/redo stacks are preserved.
Apart from making wrong modifications, doing undos or redos in this state seems to be able to overwrite nearby memory or in the case of redo, trigger the assert at the top of STB_TEXTEDIT_INSERTCHARS().
Standalone, minimal, complete and verifiable example:
This issue can be observed in the demo code.
The text was updated successfully, but these errors were encountered: