From 42b841a9c97fc58bb4a592d4b06da53f16c6910d Mon Sep 17 00:00:00 2001 From: Maxim Sobolev Date: Sat, 5 Jan 2002 16:52:44 +0000 Subject: [PATCH] In the word selection mode don't append newline if the word ends at the screen boundary. --- 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 482b86fd5bb1..568bafd90402 100644 --- a/sys/dev/syscons/scmouse.c +++ b/sys/dev/syscons/scmouse.c @@ -482,6 +482,7 @@ mouse_cut_word(scr_stat *scp) int eol; int c; int j; + int len; /* * Because we don't have locale information in the kernel, @@ -525,6 +526,9 @@ mouse_cut_word(scr_stat *scp) /* copy the found word */ mouse_do_cut(scp, start, end); + len = strlen(cut_buffer); + if (cut_buffer[len - 1] == '\r') + cut_buffer[len - 1] = '\0'; } }