Fix opening external editor when no text is inserted