From c1f25b2f6bcebe6fe0ccdc6616e46b12e773bc62 Mon Sep 17 00:00:00 2001 From: Maxim Sobolev Date: Sun, 25 Nov 2001 22:51:30 +0000 Subject: [PATCH] Fix POLA - when selecting line into syscons' cut'n'paste buffer (double click) do not include newline into the buffer. This is exacly how things worked before my recent changes to the cut'n'paste code and how they work in 4-STABLE. --- sys/dev/syscons/scmouse.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/syscons/scmouse.c b/sys/dev/syscons/scmouse.c index fcd997ee2f3..482b86fd5bb 100644 --- a/sys/dev/syscons/scmouse.c +++ b/sys/dev/syscons/scmouse.c @@ -532,11 +532,15 @@ mouse_cut_word(scr_stat *scp) static void mouse_cut_line(scr_stat *scp) { + int len; int from; if (scp->status & MOUSE_VISIBLE) { from = (scp->mouse_pos / scp->xsize) * scp->xsize; mouse_do_cut(scp, from, from + scp->xsize - 1); + len = strlen(cut_buffer); + if (cut_buffer[len - 1] == '\r') + cut_buffer[len - 1] = '\0'; scp->status |= MOUSE_CUTTING; } }