From a108be50c7bdf21ca665a425e93943438d75da82 Mon Sep 17 00:00:00 2001 From: moculus Date: Thu, 26 Mar 2009 01:28:38 +0000 Subject: [PATCH] --HG-- branch : pmacs2 --- application.py | 4 +++- bufferlist.py | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/application.py b/application.py index 4d26c1f..2d49649 100755 --- a/application.py +++ b/application.py @@ -329,8 +329,10 @@ class Application(object): if blist.slots[i].is_empty(): if blist.hidden_buffers: blist.set_slot(i, blist.hidden_buffers[0]) - else: + elif active_slot.window: blist.set_slot(i, active_slot.window.buffer) + else: + blist.set_slot(i, None) assert blist.slots[i].window is not None def close_buffer_by_name(self, name): if self.has_buffer_name(name): diff --git a/bufferlist.py b/bufferlist.py index d1b362b..24ec0de 100644 --- a/bufferlist.py +++ b/bufferlist.py @@ -17,7 +17,6 @@ class Slot(object): self.window.set_size(self.width, self.height) def set(self, w): self.window = w - #self.resize(self.height, self.width, self.y_offset, self.x_offset) w.set_size(self.width, self.height) def unset(self): if not self.is_empty():