EditTextView.st
changeset 6477 9fb3de4fdc0f
parent 6469 8d931d8edf6c
child 6514 bc98c57dfaaa
--- a/EditTextView.st	Tue Oct 30 16:52:17 2018 +0100
+++ b/EditTextView.st	Tue Nov 06 12:23:08 2018 +0100
@@ -6881,8 +6881,9 @@
                     ('Paste Box'   pasteOrReplaceBox   PasteBox  ))
     ] ifFalse:[    
         mainItems := mainItems , #(
-                    ('Copy'    copySelection    Copy   )
-                    ('Paste'   pasteOrReplace   Paste  ))
+                      ('Copy'    copySelection    Copy   )
+                      ('Paste'   pasteOrReplace   Paste  )
+                      ('Paste...'  pasteOrReplaceFromHistory PasteFromHistory ))
     ].
     mainItems := mainItems , #(
                     ('-'                               )
@@ -7950,6 +7951,20 @@
     ]
 
     "Modified: / 11-11-2017 / 12:52:31 / cg"
+!
+
+withSelfAndTextForPasteFromHistoryDo:aBlock
+    "common code for paste/replace from the copyBuffer history"
+
+    |sel|
+
+    (self checkModificationsAllowedFlashIfNot:true) ifFalse:[^ self].
+    sel := self getTextSelectionFromHistory.
+    sel notNil ifTrue:[
+        aBlock value:self value:sel.
+    ]
+
+    "Modified: / 11-11-2017 / 12:52:31 / cg"
 ! !
 
 !EditTextView methodsFor:'private'!