[Ion/clipboard] Remove CR when there's LF next

This commit is contained in:
Joachim LF
2021-03-05 10:42:15 +01:00
parent d7f7bbe862
commit 5605515fa1

View File

@@ -25,6 +25,14 @@ const char * read() {
return nullptr;
}
char * cursor = &buffer[0];
while(*cursor) {
if(*cursor == '\r' && *(cursor + 1) == '\n') {
memmove(cursor, cursor + 1, strlen(cursor));
}
cursor++;
}
/* If version has not changed, the user has not copied any text since the
* last call to write. A copy of the text already exists in
* Escher::Clipboard, and has been translated to best suit the current app :