code: def _auto_close_new_empty_buffers(self):
          
          # Get all visible EditorBuffers
          ebs = set()
          for t in self.tab_pages:
              ebs |= set(t.visible_editor_buffers())
  
          # Remove empty/new buffers that are hidden.
          for eb in self.editor_buffers[:]:
              if eb.is_new and not eb.location and eb not in ebs and eb.buffer.text == '':
                  self.editor_buffers.remove(eb)
docs: When there are new, empty buffers open. (Like, created when the editor
          starts without any files.) These can be removed at the point when there
          is no more window showing them.
  
          This should be called every time when a window is closed, or when the
          content of a window is replcaed by something new.