[ion/clipboard] Rework clipboard handling

Change the way the clipboard is fetched, so as to preserve the
Poincare/Python translation feature, and remove the cap on the length of
text being imported into the simulator.

Change-Id: I0f3e83c0c8aa4b64eb08d882aa6891b31f191e22
This commit is contained in:
Gabriel Ozouf
2020-10-26 18:06:16 +01:00
committed by Émilie Feral
parent 010b474f77
commit f66bde6d31
15 changed files with 88 additions and 44 deletions

View File

@@ -15,7 +15,10 @@ void Clipboard::store(const char * storedText, int length) {
}
const char * Clipboard::storedText() {
Ion::Clipboard::read(m_textBuffer, TextField::maxBufferSize());
const char * systemText = Ion::Clipboard::read();
if (systemText) {
return systemText;
}
/* In order to allow copy/paste of empty formulas, we need to add empty
* layouts between empty system parenthesis. This way, when the expression