Ctrl + arrow should move to word end, not next word. This also fixes a bug where it would index into into the second character when the line end gets reached.
This code originated from an imgui code editor, where it would make sense to have per-character colors. But for the console, we only ever do 1 color per line. Just store the string and one color instance, this also allows us to just take the string instead of manually reconstructing it which is very slow. The code now also only stores 32bits for color (per line) instead of 128 bits (ImVec4) as we only ever need to convert it once.
As a result, a bunch of rendering code could be dropped, and the pass filter is now also very fast as we don't need to reconstruct the string to check for the filter, we just pass a char* in which doesn't cost any perf.
* Better structure packing (reduced padding).
* 'CTextLogger::GetFilter' now returns a reference to 'm_itFilter'.
* Added additional setters and getters.
This should fix all bugs and vulnerabilities to the ImGui console. This code has been fuzzed for hours without triggering any exceptions or assertions.
Fix a potential buffer overflow that could be triggered by logging invalid characters to the Dear ImGui console. The incrementation of the loop control variable performed by 'UTF8CharLength' was never validated.