diff libgui/src/m-editor/file-editor-tab.cc @ 31081:7ea420f2c722 stable

fix file length when saving a shorter contents in editor (bug #62588) * file-editor-tab.cc (do_save_file): resize the file to current position after writing
author Torsten Lilge <ttl-octave@mailbox.org>
date Mon, 06 Jun 2022 19:17:05 +0200
parents 2b4f7287aa3a
children f0343b3685df
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc	Mon Jun 06 14:27:19 2022 +0200
+++ b/libgui/src/m-editor/file-editor-tab.cc	Mon Jun 06 19:17:05 2022 +0200
@@ -2248,6 +2248,7 @@
 
     out.flush ();
     QApplication::restoreOverrideCursor ();
+    file.resize (file.pos());
     file.flush ();
     file.close ();