Mercurial > octave
diff libgui/src/m-editor/file-editor-tab.cc @ 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 | bd5961abe971 |
children | 5749eec4e2f2 0a5b15007766 |
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,