docs: def save_current(self, path=None):
          """
          Save current editor content. Leave file to None to erase the previous
          file content. If the current editor's file_path is None and path
          is None, the function will call
          ``QtWidgets.QFileDialog.getSaveFileName`` to get a valid save filename.
  
          :param path: path of the file to save, leave it None to overwrite
              existing file.
  
          """
          try:
              if not path and not self._current.file.path:
                  path, filter = QtWidgets.QFileDialog.getSaveFileName(
                      self, _('Choose destination path'))
                  if not path:
                      return False
              old_path = self._current.file.path
              code_edit = self._current
              self._save_editor(code_edit, path)
              path = code_edit.file.path
              # path (and icon) may have changed
              if path and old_path != path:
                  self._ensure_unique_name(code_edit, code_edit.file.name)
                  self.setTabText(self.currentIndex(), code_edit._tab_name)
                  ext = os.path.splitext(path)[1]
                  old_ext = os.path.splitext(old_path)[1]
                  if ext != old_ext or not old_path:
                      icon = QtWidgets.QFileIconProvider().icon(
                          QtCore.QFileInfo(code_edit.file.path))
                      self.setTabIcon(self.currentIndex(), icon)
              return True
          except AttributeError:  # not an editor widget
              pass
          return False