changeset 29201:6695a6bf4836 stable

mark script created with commands from history as modified * file-editor-tab.cc (new_file): set modified flag of the edit area depending on the string that was added to the new edit area
author Torsten Lilge <ttl-octave@mailbox.org>
date Sat, 19 Dec 2020 16:46:53 +0100
parents 900246a8bb37
children 9ec07d894070
files libgui/src/m-editor/file-editor-tab.cc
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc	Thu Dec 17 17:57:20 2020 -0800
+++ b/libgui/src/m-editor/file-editor-tab.cc	Sat Dec 19 16:46:53 2020 +0100
@@ -2060,7 +2060,7 @@
     update_lexer ();
 
     m_edit_area->setText (commands);
-    m_edit_area->setModified (false); // new file is not modified yet
+    m_edit_area->setModified (!commands.isEmpty ());
   }
 
   void file_editor_tab::confirm_dbquit_and_save (const QString& file_to_save,