font smoothing fix, beautify fix, version number in about box, rev 0065

This commit is contained in:
benfry
2003-09-30 20:45:24 +00:00
parent d8125f8665
commit 6a000b1c3d
7 changed files with 105 additions and 24 deletions

View File

@@ -1833,7 +1833,21 @@ public class PdeEditor extends JPanel {
gotBlankLine = false;
}
}
// save current (rough) selection point
int selectionEnd = textarea.getSelectionEnd();
// replace with new bootiful text
changeText(buffer.toString(), false);
// make sure the caret would be past the end of the text
if (buffer.length() < selectionEnd - 1) {
selectionEnd = buffer.length() - 1;
}
// at least in the neighborhood
textarea.select(selectionEnd, selectionEnd);
setSketchModified(true);
buttons.clear();
}