fixing bugs with multi-tab undo, also adding loading.gif to the export

This commit is contained in:
benfry
2005-05-07 17:11:04 +00:00
parent 58541e3cd3
commit 03901abbf1
5 changed files with 82 additions and 35 deletions

View File

@@ -727,16 +727,14 @@ public class AutoFormat {
// save current (rough) selection point
int selectionEnd = editor.textarea.getSelectionEnd();
// replace with new bootiful text
editor.setText(strOut.toString(), false);
// make sure the caret would be past the end of the text
if (strOut.length() < selectionEnd - 1) {
selectionEnd = strOut.length() - 1;
}
// at least in the neighborhood
editor.textarea.select(selectionEnd, selectionEnd);
// replace with new bootiful text
// selectionEnd hopefully at least in the neighborhood
editor.setText(strOut.toString(), selectionEnd, selectionEnd);
editor.sketch.setModified();