diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 032360ad..8f9aa012 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -40,12 +40,15 @@ Other Changes: - Window: Fixed using non-zero pivot in SetNextWindowPos() when the window is collapsed. (#3433) - Nav: Fixed navigation resuming on first visible item when using gamepad. [@rokups] - Nav: Fixed using Alt to toggle the Menu layer when inside a Modal window. (#787) +- Scrolling: Fixed SetScrollHere functions edge snapping when called during a frame where ContentSize + is changing (issue introduced in 1.78). (#3452). - InputText: Added selection helpers in ImGuiInputTextCallbackData(). - InputText: Added ImGuiInputTextFlags_CallbackEdit to modify internally owned buffer after an edit. (note that InputText() already returns true on edit, the callback is useful mainly to manipulate the underlying buffer while focus is active). - InputText: Fixed using ImGuiInputTextFlags_Password with InputTextMultiline(). (#3427, #3428) It is a rather unusual or useless combination of features but no reason it shouldn't work! +- InputText: Fixed callback's helper DeleteChars() function when cursor is inside the deleted block. (#3454). - DragFloat, DragScalar: Fixed ImGuiSliderFlags_ClampOnInput not being honored in the special case where v_min == v_max. (#3361) - BeginMenuBar: Fixed minor bug where CursorPosMax gets pushed to CursorPos prior to calling BeginMenuBar(), diff --git a/imgui_demo.cpp b/imgui_demo.cpp index 05bb729a..9d0929a2 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -4209,9 +4209,9 @@ struct ExampleAppConsole } ImGui::TextWrapped( - "This example implements a console with basic coloring, completion and history. A more elaborate " + "This example implements a console with basic coloring, completion (TAB key) and history (Up/Down keys). A more elaborate " "implementation may want to store entries along with extra data such as timestamp, emitter, etc."); - ImGui::TextWrapped("Enter 'HELP' for help, press TAB to use text completion."); + ImGui::TextWrapped("Enter 'HELP' for help."); // TODO: display items starting from the bottom diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index eb5e4ad9..ba84c934 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -3620,7 +3620,7 @@ void ImGuiInputTextCallbackData::DeleteChars(int pos, int bytes_count) *dst++ = c; *dst = '\0'; - if (CursorPos + bytes_count >= pos) + if (CursorPos >= pos + bytes_count) CursorPos -= bytes_count; else if (CursorPos >= pos) CursorPos = pos;