When Ncurses recieves data in the form of a string, it tries to parse it: For example, giving it the following: Code: while(run) { endline = drawText(text, &textS, startline, &file, file.lineTotal()); wrefresh(text); mvwprintw(status, 0, 0, " "); mvwprintw(status, 0, 0, "%d - %d/%d", startline, endline, file.lineTotal() - 1); wrefresh(status); ch = mvwgetch(text, cursor.y - 1, cursor.x - 1); if(ch == 27) ...