The problem, how to tag a block of text in a textwidget when only a row-col (line-offset) pairing is know?
The Gnocl text widget has employed offsets for some time but this has always been in used in commands where the insertion point is used. Some recent changes to the getPos text subcommand will go some way in picking out words, lines etc., when using the "tag apply" instruction.
Previously, getPos would only return a line-offset pair based upon the current mouse pointer position over the widget, this has now become the default. The enhancements allow two arguments to be passed, a line-offset pair and a keyword. So, if the line-offset refers to a point mid-way in a word, its now possible to hold of other relative positions using keywords.
$text tag apply \
[$text getPos [list $a $b] wordStart] \
[$text getPos [list $a $b] wordEnd] \
-tags red
Comments