summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2001-11-25 22:51:30 +0000
committersobomax <sobomax@FreeBSD.org>2001-11-25 22:51:30 +0000
commit18d6404f669e831c9659cab64d458510e031342e (patch)
tree5815c5099b155d1060569db1bcf46172cbcae741
parentd3f49e13bf0153f0cf0186cb3bb9e9ceaa9f91bd (diff)
downloadFreeBSD-src-18d6404f669e831c9659cab64d458510e031342e.zip
FreeBSD-src-18d6404f669e831c9659cab64d458510e031342e.tar.gz
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.
-rw-r--r--sys/dev/syscons/scmouse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/syscons/scmouse.c b/sys/dev/syscons/scmouse.c
index fcd997e..482b86f 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;
}
}
OpenPOWER on IntegriCloud