git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] gitk: Synchronize highlighting in file view when scrolling diff

From
MBMarc 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.
Previous: Paul MackerrasNext: Stefan Haller
Message 5 of 10 in “gitk: Synchronize highlighting in file view when scrolling diff”
  1. gitk: Synchronize highlighting in file view when scrolling diffStefan Haller, Sep 18, 2012
  2. Peter OberndorferSep 18, 2012
  3. gitk: Synchronize highlighting in file view when scrolling diffStefan Haller, Sep 19, 2012
  4. Paul MackerrasSep 18, 2012
  5. Marc BranchaudSep 19, 2012
  6. gitk: Synchronize highlighting in file view when scrolling diffStefan Haller, Sep 19, 2012
  7. Paul MackerrasSep 23, 2012
  8. Stefan HallerSep 24, 2012
  9. gitk: Do not select file list entries during diff loadingPeter Oberndorfer, Oct 26, 2012
  10. Stefan HallerOct 29, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.