From: Eric Raible Date: Fri, 02 May 2008 18:45:37 GMT Subject: Re: gitk: synchronize highlighting in file view for 'f'&'b' commands Message-ID: <481B6151.7040707@nextest.com> In-Reply-To: <18459.3557.603906.871664@cargo.ozlabs.ibm.com> Paul Mackerras wrote: > Eric Raible writes: > >> Previously, 'b', backspace, and delete all did the same thing. >> This changes 'b' to perform the inverse of 'f'. And both of >> them now highlight the filename of the currently diff. > > OK, but... > >> + set file [regsub -- "-* (.*?) -*" [$ctext get $loc "$loc lineend"] "\\1"] >> + set cline [$cflist search -regexp [subst {^$file$}] 0.0] > > This seems to be working out the index of the line we want to > highlight in the file list, but both the callers of highlightfile can > supply that info much more easily by incrementing a count as they go > through $difffilestart, as far as I can tell. > > Paul. > That very well might be, but I: 1) wanted to make the smallest possible change 2) didn't peruse the code closely enough to see how to do that I unfortunately don't have the time to pursue this just now. Any chance you could take the idea and fly with it? Thanks - Eric