changeset 31076: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 2c8ab613e805
children 2dee06f4635c
files libgui/src/m-editor/file-editor-tab.cc
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
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 ();