mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
pr diff copied the server's patch bytes straight to stdout, so a pull request could change the terminal title, clear the screen or move the cursor of whoever viewed its diff. Add terminal.SafeWriter, which filters streamed server text like terminal.SafeText when stdout is a terminal, and use it for pr diff. Piped output stays byte-exact, so `tea pr diff N | git apply` keeps working. Signed-off-by: bircni <bircni@icloud.com>