MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / stb_text_makeundo_replace

Function stb_text_makeundo_replace

KBotExt/imgui/imstb_textedit.h:1346–1354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1344}
1345
1346static void stb_text_makeundo_replace(STB_TEXTEDIT_STRING* str, STB_TexteditState* state, int where, int old_length, int new_length)
1347{
1348 int i;
1349 STB_TEXTEDIT_CHARTYPE* p = stb_text_createundo(&state->undostate, where, old_length, new_length);
1350 if (p) {
1351 for (i = 0; i < old_length; ++i)
1352 p[i] = STB_TEXTEDIT_GETCHAR(str, where + i);
1353 }
1354}
1355
1356// reset the state to default
1357static void stb_textedit_clear_state(STB_TexteditState* state, int is_single_line)

Callers 2

stb_textedit_keyFunction · 0.85
stb_textedit_replaceFunction · 0.85

Calls 2

stb_text_createundoFunction · 0.85
STB_TEXTEDIT_GETCHARFunction · 0.85

Tested by

no test coverage detected