code: def modification_changed(self, state=None, index=None, editor_id=None):
          
          if editor_id is not None:
              for index, _finfo in enumerate(self.data):
                  if id(_finfo.editor) == editor_id:
                      break
          # This must be done before refreshing save/save all actions:
          # (otherwise Save/Save all actions will always be enabled)
          self.opened_files_list_changed.emit()
          # --
          if index is None:
              index = self.get_stack_index()
          if index == -1:
              return
          finfo = self.data[index]
          if state is None:
              state = finfo.editor.document().isModified() or finfo.newly_created
          self.set_stack_title(index, state)
          # Toggle save/save all actions state
          self.save_action.setEnabled(state)
          self.refresh_save_all_action.emit()
          # Refreshing eol mode
          eol_chars = finfo.editor.get_line_separator()
          self.refresh_eol_chars(eol_chars)
          self.stack_history.refresh()
docs: Current editor's modification state has changed
          --> change tab title depending on new modification state
          --> enable/disable save/save all actions