SLMSBVJWPDXVUGRHC4INGEZVAU3ILXPEMCNZIXHSL5GSMT7PAKRAC local endpos = line_cache.screen_line_starting_pos[i+1]return line.data:sub(offset, end_offset-1)endfunction Text.draw_cursor(State, x, y)-- blink every 0.5sif math.floor(Cursor_time*2)%2 == 0 thenApp.color(Cursor_color)love.graphics.rectangle('fill', x,y, 3,State.line_height)endState.cursor_x = xState.cursor_y = y+State.line_heightendfunction Text.populate_screen_line_starting_pos(State, line_index)local line = State.lines[line_index]local end_offset = Text.offset(line.data, endpos)