when pasted text has white space trailing or preceding, error was
indicated that "" could not be loaded.
/*
* tidy inputs and check there is something to search for
*/
/*
* tidy inputs and check there is something to search for
*/
- String text = textArea.getText();
+ String t0 = textArea.getText();
+ String text = text.trim(); // BH 2019.01.30
if (replacePunctuation.isEnabled() && replacePunctuation.isSelected())
{
text = text.replace(",", ";");
}
text = text.replaceAll("(\\s|[,; ])+", ";");
if (replacePunctuation.isEnabled() && replacePunctuation.isSelected())
{
text = text.replace(",", ";");
}
text = text.replaceAll("(\\s|[,; ])+", ";");
- textArea.setText(text);
+ if (!t0.equals(text)) // BH 2019.01.30 no need to do setting if it is the same
+ textArea.setText(text);
if (text.isEmpty())
{
// todo i18n
if (text.isEmpty())
{
// todo i18n