gitk: Fix some corner cases in the targetid/targetrow stuff
authorPaul Mackerras <paulus@samba.org>
Tue, 1 Jan 2008 22:59:39 +0000 (09:59 +1100)
committerPaul Mackerras <paulus@samba.org>
Tue, 1 Jan 2008 22:59:39 +0000 (09:59 +1100)
commit42a671fc006122159aec06da28045ffee49d3244
treed0a5d64b943e85bb3e3d98d2a72b1a3eab07eb20
parent33de5c0da8d8ea566ab8e8d91b513a98fceb414a
gitk: Fix some corner cases in the targetid/targetrow stuff

* Make sure targetrow is never >= numcommits
* Don't try to do anything about the target row if the targetid is
  no longer in the view; it'll just cause Tcl errors
* In insertrow, increment targetrow if we are inserting the fake
  commit at or before the target row
* In removerow, if we are removing the target row, make it the next
  one instead.

Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk