Fixed issue in the script editor - the selected text was not deleted properly