[kupfer] clipboard: Detect incremental updates of selection (also and the end)
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [kupfer] clipboard: Detect incremental updates of selection (also and the end)
- Date: Mon, 8 Mar 2010 23:11:20 +0000 (UTC)
commit f95c390faef22bd9ce77612adcc2f7a348cc6d0b
Author: Karol BÄ?dkowski <karol bedkowski gmail com>
Date: Mon Mar 8 13:30:02 2010 +0100
clipboard: Detect incremental updates of selection (also and the end)
kupfer/plugin/clipboard.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/plugin/clipboard.py b/kupfer/plugin/clipboard.py
index 2b8faf7..7a21c0f 100644
--- a/kupfer/plugin/clipboard.py
+++ b/kupfer/plugin/clipboard.py
@@ -62,8 +62,9 @@ class ClipboardSource (Source):
if newtext in self.clipboards:
self.clipboards.remove(newtext)
# if the previous text is a prefix of the new selection, supercede it
- if (is_selection and self.clipboards and
- newtext.startswith(self.clipboards[-1])):
+ if (is_selection and self.clipboards
+ and (newtext.startswith(self.clipboards[-1])
+ or newtext.endswith(self.clipboards[-1]))):
self.clipboards.pop()
self.clipboards.append(newtext)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]