forked from enlightenment/terminology
terminology: remove trailing newline when selecting text. Fix #1967
Patch by Panagiotis Galatsanos <galatsanosp at gmail com> SVN revision: 81644
This commit is contained in:
parent
d5d2328bf4
commit
20ce6a52f6
|
@ -773,7 +773,16 @@ _getsel_cb(void *data, Evas_Object *obj __UNUSED__, Elm_Selection_Data *ev)
|
||||||
for (i = 0; i < ev->len; i++)
|
for (i = 0; i < ev->len; i++)
|
||||||
{
|
{
|
||||||
tmp[i] = s[i];
|
tmp[i] = s[i];
|
||||||
if (tmp[i] == '\n') tmp[i] = '\r';
|
if (tmp[i] == '\n')
|
||||||
|
{
|
||||||
|
// remove trailing new line
|
||||||
|
if (i != (ev->len - 2)) tmp[i] = '\r';
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tmp[i] = '\0';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
termpty_write(sd->pty, tmp, ev->len - 1);
|
termpty_write(sd->pty, tmp, ev->len - 1);
|
||||||
free(tmp);
|
free(tmp);
|
||||||
|
|
Loading…
Reference in New Issue