now with correct handling of deleting from the last line of an editable block