git: d2d30464365e - main - vt(4): Clear paste buffer after pasting.

From: Hans Petter Selasky <hselasky_at_FreeBSD.org>
Date: Wed, 05 Oct 2022 09:54:48 UTC
The branch main has been updated by hselasky:

URL: https://cgit.FreeBSD.org/src/commit/?id=d2d30464365ebaa9f4b04371f947fcffcc3975e1

commit d2d30464365ebaa9f4b04371f947fcffcc3975e1
Author:     Ivan Quitschal <tezeka@hotmail.com>
AuthorDate: 2022-10-05 08:37:08 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-10-05 09:51:49 +0000

    vt(4): Clear paste buffer after pasting.
    
    MFC after:      1 week
    Sponsored by:   NVIDIA Networking
    Differential Revision:  https://reviews.freebsd.org/D36042
---
 sys/dev/vt/vt_core.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c
index f0ea59e134ac..213b11bee8f5 100644
--- a/sys/dev/vt/vt_core.c
+++ b/sys/dev/vt/vt_core.c
@@ -2227,6 +2227,10 @@ vt_mouse_event(int type, int x, int y, int event, int cnt, int mlevel)
 			break;
 		default:
 			vt_mouse_paste();
+			/* clear paste buffer selection after paste */
+			vtbuf_set_mark(&vw->vw_buf, VTB_MARK_START,
+			    vd->vd_mx / vf->vf_width,
+			    vd->vd_my / vf->vf_height);
 			break;
 		}
 		return; /* Done */