From 2fcf54018eb1bd8b9e177e322f5d833fa53107ff Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sun, 28 May 2006 00:58:04 +0200 Subject: [PATCH] Minor usability fix: when closing never switch to an already closed view --- tig.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; -- 2.30.2