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]))