code: def refresh(self, index=None):
          
          if index is None:
              index = self.get_stack_index()
          # Set current editor
          if self.get_stack_count():
              index = self.get_stack_index()
              finfo = self.data[index]
              editor = finfo.editor
              editor.setFocus()
              self._refresh_outlineexplorer(index, update=False)
              self.__refresh_statusbar(index)
              self.__refresh_readonly(index)
              self.__check_file_status(index)
              self.__modify_stack_title()
              self.update_plugin_title.emit()
          else:
              editor = None
          # Update the modification-state-dependent parameters
          self.modification_changed()
          # Update FindReplace binding
          self.find_widget.set_editor(editor, refresh=False)
docs: Refresh tabwidget