summaryrefslogtreecommitdiff
path: root/sys/dev/vt
diff options
context:
space:
mode:
authorJason A. Harmening <jah@FreeBSD.org>2020-08-02 20:18:37 +0000
committerJason A. Harmening <jah@FreeBSD.org>2020-08-02 20:18:37 +0000
commit4fdb1b227cf6853f31fb655bc3e327ae16e7f09b (patch)
tree9b107f72d0304b71c84c48d656181758c948b426 /sys/dev/vt
parent9fce5c4b3ce8580bb441923d0174df797f74a860 (diff)
Notes
Diffstat (limited to 'sys/dev/vt')
-rw-r--r--sys/dev/vt/vt_core.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c
index 5311a8bd6788..952dcbbbb6b9 100644
--- a/sys/dev/vt/vt_core.c
+++ b/sys/dev/vt/vt_core.c
@@ -454,7 +454,7 @@ vt_window_postswitch(struct vt_window *vw)
return (0);
}
-/* vt_late_window_switch will done VT switching for regular case. */
+/* vt_late_window_switch will do VT switching for regular case. */
static int
vt_late_window_switch(struct vt_window *vw)
{
@@ -2326,12 +2326,11 @@ skip_thunk:
case CONS_HISTORY:
if (*(int *)data < 0)
return EINVAL;
- if (*(int *)data != vd->vd_curwindow->vw_buf.vb_history_size)
- vtbuf_sethistory_size(&vd->vd_curwindow->vw_buf,
- *(int *)data);
+ if (*(int *)data != vw->vw_buf.vb_history_size)
+ vtbuf_sethistory_size(&vw->vw_buf, *(int *)data);
return (0);
case CONS_CLRHIST:
- vtbuf_clearhistory(&vd->vd_curwindow->vw_buf);
+ vtbuf_clearhistory(&vw->vw_buf);
/*
* Invalidate the entire visible window; it is not guaranteed
* that this operation will be immediately followed by a scroll
@@ -2339,9 +2338,11 @@ skip_thunk:
* to remain visible.
*/
VT_LOCK(vd);
- vd->vd_flags |= VDF_INVALID;
+ if (vw == vd->vd_curwindow) {
+ vd->vd_flags |= VDF_INVALID;
+ vt_resume_flush_timer(vw, 0);
+ }
VT_UNLOCK(vd);
- vt_resume_flush_timer(vd->vd_curwindow, 0);
return (0);
case CONS_GET:
/* XXX */