If I read the documentation correctly, all you need to do is $text->tagRaise('sel', 'selectedTerm'); to give the selection tag a higher priority than the selected-term tag.
Using the <<Selection>> event should make your code more efficient if the user often clicks for reasons other than selecting text.
In reply to Re: Tk Text highlight color
by jcb
in thread Tk Text highlight color
by IB2017
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |