Menu

#28 Replace/Find prepends pattern to the text

open
nobody
Util (2)
5
2006-06-06
2006-06-06
Anonymous
No

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;

Discussion


Log in to post a comment.

MongoDB Logo MongoDB