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

Function stb_textedit_prep_selection_at_cursor

KBotExt/imgui/imstb_textedit.h:675–681  ·  view source on GitHub ↗

update selection and cursor to match each other

Source from the content-addressed store, hash-verified

673
674// update selection and cursor to match each other
675static void stb_textedit_prep_selection_at_cursor(STB_TexteditState* state)
676{
677 if (!STB_TEXT_HAS_SELECTION(state))
678 state->select_start = state->select_end = state->cursor;
679 else
680 state->cursor = state->select_end;
681}
682
683// API cut: delete selection
684static int stb_textedit_cut(STB_TEXTEDIT_STRING* str, STB_TexteditState* state)

Callers 2

stb_textedit_keyFunction · 0.85
InputTextExMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected