Updated the handling of "overflow" data

modified:   nms.h
This commit is contained in:
Brian Barto 2016-04-15 15:14:06 -04:00
parent 61f05b0307
commit e2ab6966a7

View File

@ -88,6 +88,7 @@ void nmsexec(void) {
initscr(); initscr();
cbreak(); cbreak();
noecho(); noecho();
scrollok(stdscr, true);
// Setting up and starting colors if terminal supports them // Setting up and starting colors if terminal supports them
if (has_colors()) { if (has_colors()) {
@ -219,23 +220,27 @@ void nmsexec(void) {
// Printing remaining characters from list if we stopped short due to // Printing remaining characters from list if we stopped short due to
// a terminal row limitation. i.e. the number of textual rows in the input // a terminal row limitation. i.e. the number of textual rows in the input
// stream were greater than the number of rows in the terminal. // stream were greater than the number of rows in the terminal.
/* TODO - Handle overflow data via ncurses in some way
int prevRow; int prevRow;
if (list_pointer != NULL) { if (list_pointer != NULL) {
attron(A_BOLD);
if (has_colors())
attron(COLOR_PAIR(1));
prevRow = list_pointer->row; prevRow = list_pointer->row;
//printf(KCYN); scroll(stdscr);
while (list_pointer != NULL) { while (list_pointer != NULL) {
while (list_pointer->row > prevRow) { while (list_pointer->row > prevRow) {
//printf("\n"); scroll(stdscr);
++prevRow; ++prevRow;
} }
mvaddch(list_pointer->row, list_pointer->col, list_pointer->source); mvaddch(termSizeRows -1, list_pointer->col, list_pointer->source);
refresh();
//mvaddch(0, 0, list_pointer->source);
list_pointer = list_pointer->next; list_pointer = list_pointer->next;
} }
//printf(KNRM); attroff(A_BOLD);
//printf("\n"); if (has_colors())
attroff(COLOR_PAIR(1));
} }
*/
// End curses mode // End curses mode
endwin(); endwin();