Skip to content

Commit c255056

Browse files
Philip OakleyGit for Windows Build Agent
Philip Oakley
authored and
Git for Windows Build Agent
committed
git gui: allow for a long recentrepo list
The gui.recentrepo list may be longer than the maxrecent setting. Allow extra space to show any extra entries. In an ideal world, the git gui would limit the number of entries to the maxrecent setting, however the recentrepo config list may have been extended outwith the gui, or the maxrecent setting changed to a reduced value. Further, when testing the gui's recentrepo logic it is useful to show these extra, but valid, entries. Signed-off-by: Philip Oakley <[email protected]>
1 parent ca4ed8c commit c255056

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

git-gui/lib/choose_repository.tcl

+5-1
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ constructor pick {} {
142142
-label [mc "Recent Repositories"]
143143
}
144144

145+
if {[set lenrecent [llength $sorted_recent]] < $maxrecent} {
146+
set lenrecent $maxrecent
147+
}
148+
145149
${NS}::label $w_body.space
146150
${NS}::label $w_body.recentlabel \
147151
-anchor w \
@@ -153,7 +157,7 @@ constructor pick {} {
153157
-background [get_bg_color $w_body.recentlabel] \
154158
-wrap none \
155159
-width 50 \
156-
-height $maxrecent
160+
-height $lenrecent
157161
$w_recentlist tag conf link \
158162
-foreground blue \
159163
-underline 1

0 commit comments

Comments
 (0)