summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 687c876)
raw | patch | inline | side by side (parent: 687c876)
author | Paul Mackerras <paulus@samba.org> | |
Thu, 27 Sep 2007 00:35:05 +0000 (10:35 +1000) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Thu, 27 Sep 2007 00:35:05 +0000 (10:35 +1000) |
insertrow and removerow were trying to adjust rowidlist, rowisopt
and rowfinal even if the row where we're inserting/deleting stuff
hasn't been laid out yet, which resulted in Tcl errors. This fixes
that.
Also we weren't deleting the link$linknum tag in appendwithlinks,
which resulted in SHA1 IDs in the body of a commit message sometimes
getting shown in blue with underlining when they shouldn't.
Signed-off-by: Paul Mackerras <paulus@samba.org>
and rowfinal even if the row where we're inserting/deleting stuff
hasn't been laid out yet, which resulted in Tcl errors. This fixes
that.
Also we weren't deleting the link$linknum tag in appendwithlinks,
which resulted in SHA1 IDs in the body of a commit message sometimes
getting shown in blue with underlining when they shouldn't.
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index a5d0d66e6c55691eb5710cbcb0cd79cee6ad509a..34fe33771fc947ee096b197c77ba35037fe5429f 100755 (executable)
--- a/gitk
+++ b/gitk
incr commitidx($curview)
set ordertok($curview,$newcmit) $ordertok($curview,$p)
- set idlist [lindex $rowidlist $row]
- if {[llength $kids] == 1} {
- set col [lsearch -exact $idlist $p]
- lset idlist $col $newcmit
- } else {
- set col [llength $idlist]
- lappend idlist $newcmit
+ if {$row < [llength $rowidlist]} {
+ set idlist [lindex $rowidlist $row]
+ if {$idlist ne {}} {
+ if {[llength $kids] == 1} {
+ set col [lsearch -exact $idlist $p]
+ lset idlist $col $newcmit
+ } else {
+ set col [llength $idlist]
+ lappend idlist $newcmit
+ }
+ }
+ set rowidlist [linsert $rowidlist $row $idlist]
+ set rowisopt [linsert $rowisopt $row 0]
+ set rowfinal [linsert $rowfinal $row [lindex $rowfinal $row]]
}
- set rowidlist [linsert $rowidlist $row $idlist]
- set rowisopt [linsert $rowisopt $row 0]
- set rowfinal [linsert $rowfinal $row [lindex $rowfinal $row]]
incr numcommits
}
incr commitidx($curview) -1
- set rowidlist [lreplace $rowidlist $row $row]
- set rowisopt [lreplace $rowisopt $row $row]
- set rowfinal [lreplace $rowfinal $row $row]
+ if {$row < [llength $rowidlist]} {
+ set rowidlist [lreplace $rowidlist $row $row]
+ set rowisopt [lreplace $rowisopt $row $row]
+ set rowfinal [lreplace $rowfinal $row $row]
+ }
incr numcommits -1
set e [lindex $l 1]
set linkid [string range $text $s $e]
incr e
+ $ctext tag delete link$linknum
$ctext tag add link$linknum "$start + $s c" "$start + $e c"
setlink $linkid link$linknum
incr linknum