changeset 1981:2f97e58b6fa1

primitivus: paste is now treated as normal text instead of discarded if edit_bar doesn't exist
author Goffi <goffi@goffi.org>
date Tue, 28 Jun 2016 18:32:57 +0200
parents 4c2f2234b71e
children e6b51b7ff31f e1d482386395
files frontends/src/primitivus/primitivus
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/primitivus/primitivus	Mon Jun 27 22:54:35 2016 +0200
+++ b/frontends/src/primitivus/primitivus	Tue Jun 28 18:32:57 2016 +0200
@@ -417,7 +417,10 @@
             try:
                 edit_bar = self.editBar
             except AttributeError:
-                log.warning(u"Paste discarded: there is no edit bar yet")
+                log.warning(u"Paste treated as normal text: there is no edit bar yet")
+                if extra is None:
+                    extra = []
+                extra.extend(input_)
             else:
                 if self.main_widget.focus == edit_bar:
                     # XXX: if a paste is detected, we append it directly to the edit bar text