@@ -54,7 +54,7 @@ proc getcommits {rargs} {
54
54
$canv create text 3 3 -anchor nw -text " Reading commits..." \
55
55
-font $mainfont -tags textitems
56
56
. config -cursor watch
57
- $ctext config -cursor watch
57
+ settextcursor watch
58
58
}
59
59
60
60
proc getcommitlines {commfd} {
@@ -277,7 +277,7 @@ proc makewindow {} {
277
277
global canv canv2 canv3 linespc charspc ctext cflist textfont
278
278
global findtype findtypemenu findloc findstring fstring geometry
279
279
global entries sha1entry sha1string sha1but
280
- global maincursor textcursor
280
+ global maincursor textcursor curtextcursor
281
281
global rowctxmenu gaudydiff mergemax
282
282
283
283
menu .bar
@@ -465,6 +465,7 @@ proc makewindow {} {
465
465
466
466
set maincursor [. cget -cursor]
467
467
set textcursor [$ctext cget -cursor]
468
+ set curtextcursor $textcursor
468
469
469
470
set rowctxmenu .rowctxmenu
470
471
menu $rowctxmenu -tearoff 0
@@ -1142,7 +1143,18 @@ proc finishcommits {} {
1142
1143
drawrest $level [llength $startcommits ]
1143
1144
}
1144
1145
. config -cursor $maincursor
1145
- $ctext config -cursor $textcursor
1146
+ settextcursor $textcursor
1147
+ }
1148
+
1149
+ # Don't change the text pane cursor if it is currently the hand cursor,
1150
+ # showing that we are over a sha1 ID link.
1151
+ proc settextcursor {c} {
1152
+ global ctext curtextcursor
1153
+
1154
+ if {[$ctext cget -cursor] == $curtextcursor } {
1155
+ $ctext config -cursor $c
1156
+ }
1157
+ set curtextcursor $c
1146
1158
}
1147
1159
1148
1160
proc drawgraph {} {
@@ -1377,7 +1389,7 @@ proc stopfindproc {{done 0}} {
1377
1389
unset findinprogress
1378
1390
if {$phase != " incrdraw" } {
1379
1391
. config -cursor $maincursor
1380
- $ctext config -cursor $textcursor
1392
+ settextcursor $textcursor
1381
1393
}
1382
1394
}
1383
1395
}
@@ -1420,7 +1432,7 @@ proc findpatches {} {
1420
1432
fileevent $f readable readfindproc
1421
1433
set finddidsel 0
1422
1434
. config -cursor watch
1423
- $ctext config -cursor watch
1435
+ settextcursor watch
1424
1436
set findinprogress 1
1425
1437
}
1426
1438
@@ -1525,7 +1537,7 @@ proc findfiles {} {
1525
1537
set id $lineid($l)
1526
1538
set p [lindex $parents($id) 0]
1527
1539
. config -cursor watch
1528
- $ctext config -cursor watch
1540
+ settextcursor watch
1529
1541
set findinprogress 1
1530
1542
findcont [list $id $p ]
1531
1543
update
@@ -1802,10 +1814,14 @@ proc selectline {l isnew} {
1802
1814
set linkid [string range $comment $s $e ]
1803
1815
if {![info exists idline($linkid )]} continue
1804
1816
incr e
1805
- $ctext tag conf link$i -foreground blue -underline 1
1817
+ $ctext tag add link " $commentstart + $s c " " $commentstart + $e c "
1806
1818
$ctext tag add link$i " $commentstart + $s c" " $commentstart + $e c"
1807
1819
$ctext tag bind link$i <1> [list selectline $idline($linkid) 1]
1820
+ incr i
1808
1821
}
1822
+ $ctext tag conf link -foreground blue -underline 1
1823
+ $ctext tag bind link <Enter> { %W configure -cursor hand2 }
1824
+ $ctext tag bind link <Leave> { %W configure -cursor $curtextcursor }
1809
1825
1810
1826
$ctext tag delete Comments
1811
1827
$ctext tag remove found 1.0 end
0 commit comments