svn commit: r270667 - head/sys/dev/vt

Jean-Sebastien Pedron dumbbell at
Tue Aug 26 17:48:06 UTC 2014

Author: dumbbell
Date: Tue Aug 26 17:48:05 2014
New Revision: 270667

  vt(4): When creating a window buffer, fill it entirely
  ... not just the visible part.
  This fixes a bug where, when switching from eg. vt_vga to vt_fb (ie. the
  resolution goes up), the originally hidden, uninitialized area of the
  buffer is displayed on the screen. This leads to a missing text cursor
  when it's over an unitialized area.
  This was also visible when selecting text: the uninitialized area was
  not highlighted.
  Internally, this area was zeroed: characters were all 0x00000000,
  meaning the foreground and background color was black. Now, everything
  is filled with a space with a gray foreground color, like the visible
  While here, remove the check for the mute flag and always use
  TERMINAL_NORM_ATTR as the character attribute (ie. gray foreground,
  black background).
  MFC after:	1 week


Modified: head/sys/dev/vt/vt_buf.c
--- head/sys/dev/vt/vt_buf.c	Tue Aug 26 16:40:20 2014	(r270666)
+++ head/sys/dev/vt/vt_buf.c	Tue Aug 26 17:48:05 2014	(r270667)
@@ -410,9 +410,9 @@ vtbuf_init_early(struct vt_buf *vb)
 	rect.tr_begin.tp_row = rect.tr_begin.tp_col = 0;
-	rect.tr_end = vb->vb_scr_size;
-	vtbuf_fill(vb, &rect, VTBUF_SPACE_CHAR((boothowto & RB_MUTE) == 0 ?
+	rect.tr_end.tp_col = vb->vb_scr_size.tp_col;
+	rect.tr_end.tp_row = vb->vb_history_size;
+	vtbuf_fill(vb, &rect, VTBUF_SPACE_CHAR(TERMINAL_NORM_ATTR));
 	if ((vb->vb_flags & VBF_MTX_INIT) == 0) {
 		mtx_init(&vb->vb_lock, "vtbuf", NULL, MTX_SPIN);

More information about the svn-src-all mailing list