code: def unregister_editorstack(self, editorstack):
          
          self.remove_last_focus_editorstack(editorstack)
          if len(self.editorstacks) > 1:
              index = self.editorstacks.index(editorstack)
              self.editorstacks.pop(index)
              return True
          else:
              # editorstack was not removed!
              return False
docs: Removing editorstack only if it's not the last remaining