# prevent gitk collapsing tree view when viewing a different commit?

3 messages from 2013-12-19 to 2013-12-19. Participants: Adam Spiers, Marc Branchaud.
Thread: https://gitlist.dev/t/35551

## Adam Spiers, 2013-12-19 15:15

Subject: prevent gitk collapsing tree view when viewing a different commit?
Message-ID: <20131219151507.GC23496@pacific.linksys.moosehall>
URL: https://gitlist.dev/e/20131219151507.GC23496%40pacific.linksys.moosehall

```
Hi all,

If I launch gitk, switch the lower right pane from Patch view mode to
Tree view, expand a few directories, and then changing to viewing a
different commit, the tree automatically collapses again.  This is
really annoying when trying to view changes to the tree structure over
time; is there any way to stop it, or would it be an easy tweak to the
code for someone familiar with it?  I had a look at the code but could
hardly understand any of it :-/

Thanks,
Adam

```

## Marc Branchaud, 2013-12-19 18:57

Subject: Re: prevent gitk collapsing tree view when viewing a different commit?
Message-ID: <52B341A7.8050803@xiplink.com>
URL: https://gitlist.dev/e/52B341A7.8050803%40xiplink.com
In-Reply-To: <20131219151507.GC23496@pacific.linksys.moosehall>

```
On 13-12-19 10:15 AM, Adam Spiers wrote:
> Hi all,
> 
> If I launch gitk, switch the lower right pane from Patch view mode to
> Tree view, expand a few directories, and then changing to viewing a
> different commit, the tree automatically collapses again.  This is
> really annoying when trying to view changes to the tree structure over
> time; is there any way to stop it, or would it be an easy tweak to the
> code for someone familiar with it?  I had a look at the code but could
> hardly understand any of it :-/

What I would really like is that if I have a file selected in Patch view,
then that file is displayed when I switch to Tree view, and vice-versa.

Unfortunately such a change is beyond my Tcl skills.

		M.

```

## Adam Spiers, 2013-12-19 19:04

Subject: Re: prevent gitk collapsing tree view when viewing a different commit?
Message-ID: <20131219190401.GF23496@pacific.linksys.moosehall>
URL: https://gitlist.dev/e/20131219190401.GF23496%40pacific.linksys.moosehall
In-Reply-To: <52B341A7.8050803@xiplink.com>

```
On Thu, Dec 19, 2013 at 01:57:43PM -0500, Marc Branchaud wrote:
> On 13-12-19 10:15 AM, Adam Spiers wrote:
> > If I launch gitk, switch the lower right pane from Patch view mode to
> > Tree view, expand a few directories, and then changing to viewing a
> > different commit, the tree automatically collapses again.  This is
> > really annoying when trying to view changes to the tree structure over
> > time; is there any way to stop it, or would it be an easy tweak to the
> > code for someone familiar with it?  I had a look at the code but could
> > hardly understand any of it :-/
> 
> What I would really like is that if I have a file selected in Patch view,
> then that file is displayed when I switch to Tree view, and vice-versa.

Yes, that would be fantastic!

> Unfortunately such a change is beyond my Tcl skills.

Mine too :-/

```
