Closed goossens closed 1 year ago
that's good to know, thank you for reporting the issue. My understanding was that the value is being copied when i do the (int) casting and that's why it compiles correctly.
let me know if https://github.com/santaclose/ImGuiColorTextEdit/commit/62490a207dae0b05b462205279e90b72778e2271 fixes the issue
Thanks, problem is now fixed. Closing issue.
I can’t compile the current version due to errors in the rewrite of FindWordStart and FindWordEnd. When those methods were changed in commit https://github.com/santaclose/ImGuiColorTextEdit/commit/6ee401bd5477da9a894a10d372c8c375dc74a842 to use the new Move method, the aFront calling parameters is changed although it’s declared as a const reference. I’m surprised the Windows compiler allowed it (even with the type cast).
The offending lines in FindWordStart and FindWordEnd are the ones with the Move calls like:
while (Move((int)aFrom.mLine, charIndex, true, true))
My simple fix was to use the same pattern that was already used in the (now deleted) FindNextWord method. You can see my change at https://github.com/goossens/ImGuiColorTextEdit/commit/583fc70fbb1f58b33c628db24cb0c51cb505a642.