Evaluated proc cgetchar {mmap x y} { set out ""; set line [lindex $mmap $y]; set c 0; foreach chunk $line { if { $x >= $c && $x <= [+ $c [string length [lindex $chunk 2]]] && [string length [string index [lindex $chunk 2] [- $x $c]]] > 0 } {   }; incr c [string length [lindex $chunk 2]]; };. $out }