editors/ted: Refactoring
Lint with portclippy and portfmt. Refactoring do-install. Regenerate patchfile.
PR: 291942 Approved by: osa (mentor)