Replace/Find prepends pattern to the text
Brought to you by:
lauerc
Submitted by apakhomov@cyberacc.com
When using the Find/Replace dialog in the UJAC-UI
library, the Replace/Find button inserts the the
contents of the replace buffer at the beginning of the
text. This only happens when there is no previous pattern.
Suggested fix: prohibit the replacing of selections
with zero length by inserting the following code in the
replace() method of the org.ujac.ui.editor.TextArea class
if(selectionStart == selectionEnd)
return;