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.
This commit is contained in:
Maxim Sobolev 2001-11-25 22:51:30 +00:00
parent 5744b3eac4
commit c1f25b2f6b

View File

@ -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;
}
}