From 341bea3c1624215ef602a3b91afd4fda44eec3b8 Mon Sep 17 00:00:00 2001 From: amontano Date: Thu, 3 Apr 2003 05:17:40 +0000 Subject: [PATCH] Added a line to the paste method so that if text is selected, the pasted text substitute the selected text. --- source/org/thdl/tib/input/DuffPane.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/org/thdl/tib/input/DuffPane.java b/source/org/thdl/tib/input/DuffPane.java index 2f133c4..45e6a1b 100644 --- a/source/org/thdl/tib/input/DuffPane.java +++ b/source/org/thdl/tib/input/DuffPane.java @@ -1018,6 +1018,9 @@ class RTFSelection implements ClipboardOwner, Transferable { } public void paste() { + /* added by AM. If we are pasting over selected text, such text + such be substituted by the text to be pasted. */ + deleteCurrentSelection(); paste(getSelectionStart()); }