fix additional intersection checks in `proc touches`
This commit is contained in:
parent
8c431a51f8
commit
d0ee3a34fa
|
|
@ -2216,15 +2216,18 @@ proc touches {sel tag} {
|
|||
set selend [expr {$sel_lineend * 1000000 + $sel_charend}]
|
||||
set tagstart [expr {$tag_linestart * 1000000 + $tag_charstart}]
|
||||
set tagend [expr {$tag_lineend * 1000000 + $tag_charend}]
|
||||
# puts "selstart: $selstart"
|
||||
# puts "selend: $selend"
|
||||
# puts "tagstart: $tagstart"
|
||||
# puts "tagend: $tagend"
|
||||
puts "selstart: $selstart"
|
||||
puts "selend: $selend"
|
||||
puts "tagstart: $tagstart"
|
||||
puts "tagend: $tagend"
|
||||
if { ($tagstart >= $selstart && $tagstart <= $selend) ||
|
||||
($tagend >= $selstart && $tagend <= $selend) } {
|
||||
($tagend >= $selstart && $tagend <= $selend) ||
|
||||
($selstart >= $tagstart && $selstart <= $tagend) ||
|
||||
($selend >= $tagstart && $selend <= $tagend)
|
||||
} {
|
||||
set res 1
|
||||
}
|
||||
# puts "touch: returning $res"
|
||||
puts "touch: returning $res"
|
||||
return $res
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue