MCPcopy Create free account
hub / github.com/TheOfficialFloW/VitaShell / updateTextEntry

Function updateTextEntry

text.c:193–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193static void updateTextEntry(TextEditorState *state, TextListEntry* entry, int rel_pos) {
194 entry->line_number = state->base_pos + rel_pos;
195
196 // Mark entry as selected
197 entry->selected = 0;
198 int j = 0;
199 for (j = 0; j < state->n_selections; j++) {
200 if (entry->line_number == state->selection_list[j]) {
201 entry->selected = 1;
202 break;
203 }
204 }
205
206 int length = textReadLine(state->buffer, state->offset_list[state->base_pos + rel_pos], state->size, entry->line);
207 state->offset_list[state->base_pos + rel_pos + 1] = state->offset_list[state->base_pos + rel_pos] + length;
208}
209
210static void updateTextEntries(TextEditorState *state) {
211 TextListEntry *entry = state->list.head;

Callers 2

updateTextEntriesFunction · 0.85
textViewerFunction · 0.85

Calls 1

textReadLineFunction · 0.85

Tested by

no test coverage detected