From 8d741c0664539caf54cb9004151bf8f72517df06 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Mon, 29 May 2006 23:29:38 +0200 Subject: [PATCH] Fix segfault where current_view would become >= sizeof(display) Hard code current_view indexes for split screen setup. Reported-by: Dennis (dst_) on #git --- tig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tig.c b/tig.c index e7deb2e..c323cf8 100644 --- a/tig.c +++ b/tig.c @@ -1411,9 +1411,9 @@ open_view(struct view *prev, enum request request, enum open_flags flags) } if (split) { - display[current_view + 1] = view; + display[1] = view; if (!backgrounded) - current_view++; + current_view = 1; } else { /* Maximize the current view. */ memset(display, 0, sizeof(display)); -- 2.30.2