There's an irritating bug in Script Editor, when View / Dynamic Word Wrap is switched on. Consider you're editing a long line, so it's wrapped to for example 3 lines in the editor. You're typing at the end of the line and it just wrapped to fourth line. Now, start deleting text with the backspace. Once the line is shortened so it again takes only 3 lines, cursor jumps to the beginning of the line and you're suddenly deleting previous paragraph.
regards, Zbynek