From: Jonas Fonseca Date: Sat, 27 May 2006 22:58:04 +0000 (+0200) Subject: Minor usability fix: when closing never switch to an already closed view X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2fcf54018eb1bd8b9e177e322f5d833fa53107ff;p=tig.git Minor usability fix: when closing never switch to an already closed view --- diff --git a/tig.c b/tig.c index e8ee3ce..b08d3f7 100644 --- a/tig.c +++ b/tig.c @@ -1495,11 +1495,15 @@ view_driver(struct view *view, enum request request) return TRUE; case REQ_VIEW_CLOSE: - if (view->parent) { + /* XXX: Mark closed views by letting view->parent point to the + * view itself. Parents to closed view should never be + * followed. */ + if (view->parent && + view->parent->parent != view->parent) { memset(display, 0, sizeof(display)); current_view = 0; display[current_view] = view->parent; - view->parent = NULL; + view->parent = view; resize_display(); redraw_display(); break;