Hi,
I see that the home page doesn't mention the fossil repo at
tkhtml.tcl.tk/fossil. Is that the current official source?
In any case, I've been browsing the web with that version of hv3, and
encountered an error. Here is the fix. The problem is that the
get_selection method doesn't account for when the "html text offset"
command returns the empty string (it does, and the C source says it
can). Here is the output of fossil diff:
Index: hv/hv3.tcl
===================================================================
--- hv/hv3.tcl
+++ hv/hv3.tcl
@@ -786,11 +786,11 @@
$me motion $N $x $y
}
# get_selection OFFSET MAXCHARS
#
- # This command is invoked whenever the current selection is
selected
+ # This command is invoked whenever the current selection is
requested
# while it is owned by the html widget. The text of the
selected
# region is returned.
#
proc get_selection {me offset maxChars} {
upvar $me O
@@ -801,10 +801,13 @@
set n2 $O(myToNode)
set i2 $O(myToIdx)
set stridx_a [$O(myHv3) html text offset $O(myFromNode)
$O(myFromIdx)]
set stridx_b [$O(myHv3) html text offset $O(myToNode)
$O(myToIdx)]
+ if {$stridx_a eq "" || $stridx_b eq ""} {
+ return ""
+ }
if {$stridx_a > $stridx_b} {
foreach {stridx_a stridx_b} [list $stridx_b $stridx_a] {}
}
if {$O(myMode) eq "word"} {
Best,
Will