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

Re: [PATCH] [PATCH] git-gui: Add hotkeys to set widget focus

From
Pratyush Yadav <me@yadavpratyush.com>
Date
Sep 2, 2019, 18:53 UTC
Message-ID
<20190902185321.m76dffzfc76astar@yadavpratyush.com>
In-Reply-To
<CAGr--=L64jiE=x_McdfWJuQTz1Qo3wp0nc8xaeKBGe0GgW5Kxg@mail.gmail.com>
On 02/09/19 08:35PM, Birger Skogeng Pedersen wrote:
Show 12 quoted lines
> On Mon, Sep 2, 2019 at 8:19 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
> > You missed removing this extra blank line. Will fix it up locally.
> >
> > > +             set _index $file_lists_last_clicked($widget)
> > [snip]
> 
> 
> To be honest I felt the blank line there was appropriate, in an
> attempt to follow the same code style as the rest of the git-gui.sh.
> For instance, the "add_range_to_selection" function
> (https://github.com/prati0100/git-gui/blob/master/git-gui.sh#L2601-L2625)
> has blank lines like this;
 
Oh yes, these types of blank lines are perfectly fine in my opinion too.  
I actually prefer this alternative over not having any spacing at all.  
This way you divide the function in logical sections/steps.

But that was not what I pointed out. The blank line I pointed out was like this:

  if {condition} {
  	
	foo
	bar
  }
My nitpick was with the blank line _just after_ the if.
> 
> proc add_range_to_selection {w x y} {
>     global file_lists last_clicked selected_paths
> 
So in this example, the above blank line is fine...
>     if {[lindex $last_clicked 0] ne $w} {
...but if I add a blank line here like:
  if {[lindex $last_clicked 0] ne $w} {
	toggle_or_diff click $w $x $y
	return
  }
instead of like:
  if {[lindex $last_clicked 0] ne $w} {
	toggle_or_diff click $w $x $y
	return
  }

It is the blank line just after the start of your if statement that I was pointing out. I did leave other blank lines untouched in your patch.

[snip]
-- 
Regards,
Pratyush Yadav
Previous: Birger Skogeng PedersenNext: Birger Skogeng Pedersen
Message 22 of 46 in “git-gui, feature request: add hotkeys to focus different widgets”
  1. Birger Skogeng PedersenFeb 20, 2018
  2. git-gui: Add hotkeys to change focus between ui widgetsBirger Skogeng Pedersen, Feb 23, 2018
  3. Birger Skogeng PedersenFeb 23, 2018
  4. git-gui: Add hotkeys to change focus between ui widgetsBirger Skogeng Pedersen, Feb 28, 2018
  5. Johannes SchindelinMar 5, 2018
  6. Birger Skogeng PedersenMar 6, 2018
  7. Junio C HamanoMar 6, 2018
  8. git-gui: Add hotkeys to set widget focusBirger Skogeng Pedersen, Aug 31, 2019
  9. Birger Skogeng PedersenAug 31, 2019
  10. Pratyush YadavSep 1, 2019
  11. Junio C HamanoSep 1, 2019
  12. Birger Skogeng PedersenSep 1, 2019
  13. Bert WesargSep 1, 2019
  14. Bert WesargSep 1, 2019
  15. Birger Skogeng PedersenSep 1, 2019
  16. [PATCH] git-gui: Add hotkeys to set widget focusBirger Skogeng Pedersen, Sep 1, 2019
  17. Philip OakleySep 1, 2019
  18. Pratyush YadavSep 2, 2019
  19. Philip OakleySep 2, 2019
  20. Pratyush YadavSep 2, 2019
  21. Birger Skogeng PedersenSep 2, 2019
  22. Pratyush YadavSep 2, 2019
  23. Birger Skogeng PedersenSep 2, 2019
  24. Bert WesargSep 2, 2019
  25. Birger Skogeng PedersenSep 3, 2019
  26. Pratyush YadavSep 3, 2019
  27. git-gui: use path name instead of list index to track last clicked filePratyush Yadav, Sep 3, 2019
  28. Bert WesargSep 3, 2019
  29. git-gui: Add hotkeys to set widget focusBirger Skogeng Pedersen, Sep 3, 2019
  30. Birger Skogeng PedersenSep 3, 2019
  31. Birger Skogeng PedersenSep 3, 2019
  32. Pratyush YadavSep 3, 2019
  33. Pratyush YadavSep 3, 2019
  34. git-gui: Add hotkeys to set widget focusBirger Skogeng Pedersen, Sep 4, 2019
  35. Johannes SixtSep 4, 2019
  36. Birger Skogeng PedersenSep 4, 2019
  37. Bert WesargSep 4, 2019
  38. Johannes SixtSep 4, 2019
  39. Johannes SixtSep 4, 2019
  40. Pratyush YadavSep 4, 2019
  41. Junio C HamanoSep 4, 2019
  42. Pratyush YadavSep 5, 2019
  43. Pratyush YadavSep 10, 2019
  44. Birger Skogeng PedersenSep 11, 2019
  45. Pratyush YadavSep 11, 2019
  46. Johannes SixtSep 11, 2019

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.