Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156606209
D36042.id108882.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D36042.id108882.diff
View Options
Index: sys/dev/vt/vt.h
===================================================================
--- sys/dev/vt/vt.h
+++ sys/dev/vt/vt.h
@@ -238,7 +238,7 @@
#ifndef SC_NO_CUTPASTE
int vtbuf_set_mark(struct vt_buf *vb, int type, int col, int row);
int vtbuf_get_marked_len(struct vt_buf *vb);
-void vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz);
+void vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz, int mark);
#endif
#define VTB_MARK_NONE 0
Index: sys/dev/vt/vt_buf.c
===================================================================
--- sys/dev/vt/vt_buf.c
+++ sys/dev/vt/vt_buf.c
@@ -771,7 +771,7 @@
}
void
-vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz)
+vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz, int mark)
{
int i, j, r, c, cs, ce;
term_pos_t s, e;
@@ -799,7 +799,7 @@
buf[i++] = vb->vb_rows[r][c];
/* For all rows, but the last one. */
- if (r != e.tp_row) {
+ if (r != e.tp_row || mark == VTB_MARK_ROW) {
/* Trim trailing word separators, if any. */
for (; i != j; i--) {
if (!tchar_is_word_separator(buf[i - 1]))
Index: sys/dev/vt/vt_core.c
===================================================================
--- sys/dev/vt/vt_core.c
+++ sys/dev/vt/vt_core.c
@@ -2228,23 +2228,25 @@
case 0: /* up */
break;
default:
+ mark = VTB_MARK_START;
vt_mouse_paste();
break;
}
- return; /* Done */
+
case VT_MOUSE_EXTENDBUTTON:
switch (cnt) {
- case 0: /* up */
+ case 0:
if (!(vd->vd_mstate & MOUSE_BUTTON1DOWN))
- mark = VTB_MARK_EXTEND;
+ mark = VTB_MARK_START;
else
mark = 0;
break;
default:
- mark = VTB_MARK_EXTEND;
+ mark = VTB_MARK_START;
break;
}
break;
+
default:
return; /* Done */
}
@@ -2287,7 +2289,7 @@
VD_PASTEBUFSZ(vd) = len;
}
/* Request copy/paste buffer data, no more than `len' */
- vtbuf_extract_marked(&vw->vw_buf, VD_PASTEBUF(vd), len);
+ vtbuf_extract_marked(&vw->vw_buf, VD_PASTEBUF(vd), len, mark);
VD_PASTEBUFLEN(vd) = len;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 16, 1:51 AM (11 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33106672
Default Alt Text
D36042.id108882.diff (2 KB)
Attached To
Mode
D36042: vt 3 clicks paste
Attached
Detach File
Event Timeline
Log In to Comment