summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorray <ray@FreeBSD.org>2014-09-12 14:16:10 +0000
committerray <ray@FreeBSD.org>2014-09-12 14:16:10 +0000
commit70ee622dbb832bcad3ce7ea4bb2dafed2332d088 (patch)
treeece502970f34f7ca661aed7d8b46d49247968856 /sys/dev
parenta1fffb488b98ada527229a54601d03e1baffb748 (diff)
downloadFreeBSD-src-70ee622dbb832bcad3ce7ea4bb2dafed2332d088.zip
FreeBSD-src-70ee622dbb832bcad3ce7ea4bb2dafed2332d088.tar.gz
Switch vt(4) to traditional behaviour with copy-paste same as syscons(4) do.
(forgetted in last commit) Reviewed by: dumbbell (as D755) MFC after: 1 week
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/vt/vt.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/vt/vt.h b/sys/dev/vt/vt.h
index e05c748..3fbbdec 100644
--- a/sys/dev/vt/vt.h
+++ b/sys/dev/vt/vt.h
@@ -113,11 +113,17 @@ typedef unsigned int vt_axis_t;
struct vt_mouse_cursor;
#endif
+struct vt_pastebuf {
+ term_char_t *vpb_buf; /* Copy-paste buffer. */
+ unsigned int vpb_bufsz; /* Buffer size. */
+ unsigned int vpb_len; /* Length of a last selection. */
+};
+
struct vt_device {
struct vt_window *vd_windows[VT_MAXWINDOWS]; /* (c) Windows. */
struct vt_window *vd_curwindow; /* (d) Current window. */
struct vt_window *vd_savedwindow;/* (?) Saved for suspend. */
- struct vt_window *vd_markedwin; /* (?) Copy/paste buf owner. */
+ struct vt_pastebuf vd_pastebuf; /* (?) Copy/paste buf. */
const struct vt_driver *vd_driver; /* (c) Graphics driver. */
void *vd_softc; /* (u) Driver data. */
#ifndef SC_NO_CUTPASTE
@@ -151,6 +157,10 @@ struct vt_device {
unsigned int vd_unit; /* (c) Device unit. */
};
+#define VD_PASTEBUF(vd) ((vd)->vd_pastebuf.vpb_buf)
+#define VD_PASTEBUFSZ(vd) ((vd)->vd_pastebuf.vpb_bufsz)
+#define VD_PASTEBUFLEN(vd) ((vd)->vd_pastebuf.vpb_len)
+
/*
* Per-window terminal screen buffer.
*
OpenPOWER on IntegriCloud