From 0bbd529a76f904e8da466e0035d1839c3b935d1a Mon Sep 17 00:00:00 2001 From: Garux Date: Wed, 5 Nov 2025 20:26:01 +0500 Subject: [PATCH] shader editor: write file in text mode for more expected newlines --- radiant/gtkdlgs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radiant/gtkdlgs.cpp b/radiant/gtkdlgs.cpp index d33b69ba..99f68cd9 100644 --- a/radiant/gtkdlgs.cpp +++ b/radiant/gtkdlgs.cpp @@ -2351,7 +2351,7 @@ class TextEditor : public QObject hbox->addWidget( m_searchEntry ); } void editor_save(){ - FILE *f = fopen( m_filename.c_str(), "wb" ); //write in binary mode to preserve line feeds + FILE *f = fopen( m_filename.c_str(), "wt" ); if ( f == nullptr ) { globalErrorStream() << "Error saving file" << Quoted( m_filename ) << '\n';