@@ -2652,7 +2652,7 @@ proc savestuff {w} {
2652
2652
global viewname viewfiles viewargs viewargscmd viewperm nextviewnum
2653
2653
global cmitmode wrapcomment datetimeformat limitdiffs
2654
2654
global colors uicolor bgcolor fgcolor diffcolors diffcontext selectbgcolor
2655
- global autoselect extdifftool perfile_attrs markbgcolor use_ttk
2655
+ global autoselect autosellen extdifftool perfile_attrs markbgcolor use_ttk
2656
2656
global hideremotes want_ttk
2657
2657
2658
2658
if {$stuffsaved } return
@@ -2673,6 +2673,7 @@ proc savestuff {w} {
2673
2673
puts $f [list set cmitmode $cmitmode ]
2674
2674
puts $f [list set wrapcomment $wrapcomment ]
2675
2675
puts $f [list set autoselect $autoselect ]
2676
+ puts $f [list set autosellen $autosellen ]
2676
2677
puts $f [list set showneartags $showneartags ]
2677
2678
puts $f [list set hideremotes $hideremotes ]
2678
2679
puts $f [list set showlocalchanges $showlocalchanges ]
@@ -6896,7 +6897,7 @@ proc selectline {l isnew {desired_loc {}}} {
6896
6897
global mergemax numcommits pending_select
6897
6898
global cmitmode showneartags allcommits
6898
6899
global targetrow targetid lastscrollrows
6899
- global autoselect jump_to_here
6900
+ global autoselect autosellen jump_to_here
6900
6901
6901
6902
catch {unset pending_select}
6902
6903
$canv delete hover
@@ -6958,7 +6959,7 @@ proc selectline {l isnew {desired_loc {}}} {
6958
6959
$sha1entry delete 0 end
6959
6960
$sha1entry insert 0 $id
6960
6961
if {$autoselect } {
6961
- $sha1entry selection range 0 end
6962
+ $sha1entry selection range 0 $autosellen
6962
6963
}
6963
6964
rhighlight_sel $id
6964
6965
@@ -10756,7 +10757,7 @@ proc doprefs {} {
10756
10757
global maxwidth maxgraphpct use_ttk NS
10757
10758
global oldprefs prefstop showneartags showlocalchanges
10758
10759
global uicolor bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor
10759
- global tabstop limitdiffs autoselect extdifftool perfile_attrs
10760
+ global tabstop limitdiffs autoselect autosellen extdifftool perfile_attrs
10760
10761
global hideremotes want_ttk have_ttk
10761
10762
10762
10763
set top .gitkprefs
@@ -10784,9 +10785,10 @@ proc doprefs {} {
10784
10785
${NS} ::checkbutton $top .showlocal -text [mc " Show local changes" ] \
10785
10786
-variable showlocalchanges
10786
10787
grid x $top .showlocal -sticky w
10787
- ${NS} ::checkbutton $top .autoselect -text [mc " Auto-select SHA1" ] \
10788
+ ${NS} ::checkbutton $top .autoselect -text [mc " Auto-select SHA1 (length) " ] \
10788
10789
-variable autoselect
10789
- grid x $top .autoselect -sticky w
10790
+ spinbox $top .autosellen -from 1 -to 40 -width 4 -textvariable autosellen
10791
+ grid x $top .autoselect $top .autosellen -sticky w
10790
10792
${NS} ::checkbutton $top .hideremotes -text [mc " Hide remote refs" ] \
10791
10793
-variable hideremotes
10792
10794
grid x $top .hideremotes -sticky w
@@ -11428,6 +11430,7 @@ set showlocalchanges 1
11428
11430
set limitdiffs 1
11429
11431
set datetimeformat " %Y-%m-%d %H:%M:%S"
11430
11432
set autoselect 1
11433
+ set autosellen 40
11431
11434
set perfile_attrs 0
11432
11435
set want_ttk 1
11433
11436
0 commit comments