|
|
@ -2,7 +2,7 @@ |
|
|
|
// This is a slightly modified version of stb_textedit.h 1.14.
|
|
|
|
// This is a slightly modified version of stb_textedit.h 1.14.
|
|
|
|
// Those changes would need to be pushed into nothings/stb:
|
|
|
|
// Those changes would need to be pushed into nothings/stb:
|
|
|
|
// - Fix in stb_textedit_discard_redo (see https://github.com/nothings/stb/issues/321)
|
|
|
|
// - Fix in stb_textedit_discard_redo (see https://github.com/nothings/stb/issues/321)
|
|
|
|
// - Fix in stb_textedit_find_charpos to handle last line (see https://github.com/ocornut/imgui/issues/6000)
|
|
|
|
// - Fix in stb_textedit_find_charpos to handle last line (see https://github.com/ocornut/imgui/issues/6000 + #6783)
|
|
|
|
// Grep for [DEAR IMGUI] to find the changes.
|
|
|
|
// Grep for [DEAR IMGUI] to find the changes.
|
|
|
|
|
|
|
|
|
|
|
|
// stb_textedit.h - v1.14 - public domain - Sean Barrett
|
|
|
|
// stb_textedit.h - v1.14 - public domain - Sean Barrett
|
|
|
@ -549,7 +549,10 @@ static void stb_textedit_find_charpos(StbFindState *find, STB_TEXTEDIT_STRING *s |
|
|
|
i += r.num_chars; |
|
|
|
i += r.num_chars; |
|
|
|
find->y += r.baseline_y_delta; |
|
|
|
find->y += r.baseline_y_delta; |
|
|
|
if (i == z) // [DEAR IMGUI]
|
|
|
|
if (i == z) // [DEAR IMGUI]
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
r.num_chars = 0; // [DEAR IMGUI]
|
|
|
|
break; // [DEAR IMGUI]
|
|
|
|
break; // [DEAR IMGUI]
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
find->first_char = first = i; |
|
|
|
find->first_char = first = i; |
|
|
|