Commits

Robert Lowry committed 2f0a303

clear screen while drawing to avoid blinking. thanks emg for the patch.

Comments (0)

Files changed (1)

 		size = (len / cols) + (len % cols ? 1 : 0);
 		offset -= size;
 		if(offset >= 0) {
-			mvprintw(offset,0,"%s",cur->text);
+			mvprintw(offset,0,"%-*s",cols,cur->text);
 		} else {
 			break;
 		}
 	}
+	for(; offset >= 0; offset--)
+		mvprintw(offset,0,"%-*s",cols,"");
 }
 
 void draw_bar()
 
 	offset = strlen(input) - cols;
 	if (offset < 0) offset = 0;
-	if(!updatescreen)
-		for(i=0;i<cols;i++)
-			mvaddch(rows-1,i,' ');
+	for(i=0;i<cols;i++)
+		mvaddch(rows-1,i,' ');
 	mvprintw(rows-1,0,"%s",input+offset);
 	updateinput = 0;
 }
 void draw_screen()
 {
 	if(updatescreen) {
-		clear();
 		draw_lines();
 		draw_bar();
 	}