InputText: Fixed selection background starts rendering one frame after the cursor movement when first transitioning from no-selection to has-selection. (Bug in 1.69) (#2436) [@Nazg-Gul]

This commit is contained in:
omar
2019-03-25 16:06:30 +01:00
parent abb7d7b18a
commit 3d8ea352d1
2 changed files with 5 additions and 0 deletions

View File

@ -3570,6 +3570,9 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
MemFree(clipboard_filtered);
}
}
// Update render selection flag after events have been handled, so selection highlight can be displayed during the same frame.
render_selection |= state->HasSelection() && (RENDER_SELECTION_WHEN_INACTIVE || render_cursor);
}
// Process callbacks and apply result back to user's buffer.