termio: do replace \n by \r when pasting

This commit is contained in:
Boris Faure 2019-05-05 12:56:23 +02:00
parent f1837dbc0c
commit 67de5e75b2
1 changed files with 3 additions and 2 deletions

View File

@ -1047,10 +1047,11 @@ _getsel_cb(void *data,
{ {
continue; continue;
} }
for (j = prev_i; j < i; j++)
buf[pos++] = s[j];
if (g == '\n') if (g == '\n')
buf[pos++] = '\r'; buf[pos++] = '\r';
else
for (j = prev_i; j < i; j++)
buf[pos++] = s[j];
} }
if (pos) if (pos)
{ {