svn commit: r257252 - user/ed/newcons/sys/kern

Aleksandr Rybalko ray at FreeBSD.org
Mon Oct 28 14:00:07 UTC 2013


Author: ray
Date: Mon Oct 28 14:00:06 2013
New Revision: 257252
URL: http://svnweb.freebsd.org/changeset/base/257252

Log:
  Do not reset terminal state if it is not cleared on resize.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  user/ed/newcons/sys/kern/subr_terminal.c

Modified: user/ed/newcons/sys/kern/subr_terminal.c
==============================================================================
--- user/ed/newcons/sys/kern/subr_terminal.c	Mon Oct 28 13:33:29 2013	(r257251)
+++ user/ed/newcons/sys/kern/subr_terminal.c	Mon Oct 28 14:00:06 2013	(r257252)
@@ -200,12 +200,19 @@ terminal_set_winsize_blank(struct termin
 	r.tr_end.tp_col = size->ws_col;
 
 	TERMINAL_LOCK(tm);
-	teken_set_winsize(&tm->tm_emulator, &r.tr_end);
+	if (blank == 0)
+		/*
+		 * Assigned directly, to avoid terminal reset in the
+		 * teken_set_winsize.
+		 */
+		tm->tm_emulator.t_winsize = r.tr_end;
+	else
+		teken_set_winsize(&tm->tm_emulator, &r.tr_end);
 	TERMINAL_UNLOCK(tm);
 
-	if (blank)
-		tm->tm_class->tc_fill(tm, &r,
-		    TCHAR_CREATE((teken_char_t)' ', &default_message));
+	if (blank != 0)
+		tm->tm_class->tc_fill(tm, &r, TCHAR_CREATE((teken_char_t)' ',
+		    &default_message));
 
 	terminal_sync_ttysize(tm);
 }


More information about the svn-src-user mailing list