Re: [PATCH] gitk: Synchronize highlighting in file view when scrolling diff
- From
- Marc Branchaud <mbranchaud@xiplink.com>
- Date
- Sep 19, 2012, 14:28 UTC
- Message-ID
- <5059D6A2.3000401@xiplink.com>
- In-Reply-To
- <20120918234611.GA5544@bloggs.ozlabs.ibm.com>
On 12-09-18 07:46 PM, Paul Mackerras wrote:
Show 11 quoted lines
> On Tue, Sep 18, 2012 at 07:57:54AM +0200, Stefan Haller wrote: >> Whenever the diff pane scrolls, highlight the corresponding file in the >> file list on the right. For a large commit with many files and long >> per-file diffs, this makes it easier to keep track of what you're looking >> at. > > I like this as far as it goes, but the one criticism I would have is > that when you find a string (using the "Search" button), the filename > that gets highlighted is often not the file in which the string was > found (because the highlighting is based on the top line visible in > the text window), which could be confusing.
Well, gitk currently doesn't highlight the matching file (or files -- there can be more than one). Stefan's patch isn't changing anything with how string matching already works.
> Can you think of a way to solve that too? Perhaps make the > highlighting based on the currently highlighted instance of the search > string, if there is one, otherwise based on the top line visible?
I think you're asking for a new feature.
Highlight-files-with-string-matches is different from Stefan's consistently-highlight-currently-displayed-file, so it should be done differently. Perhaps use a different highlight colour, or overlay the matching files with an icon.
M.