Commits

Anonymous committed 5150f2a

stick to writing the entire file so we have scrollback

Comments (0)

Files changed (1)

 
 void sigwinch(int unused)
 {
-	long pos;
-
 	if (ioctl(STDERR, TIOCGWINSZ, &ws) < 0)
 		warn("failed ioctl");
 
-	pos = ftell(in);
-	fseek(in, MAX(0, pos - (ws.ws_col * ws.ws_row)), SEEK_SET);
+	rewind(in);
 
 	while (fgets(buf, sizeof(buf), in))
 		print_line(buf);