TK Text widget Tab Bug.


Intro

The text widget under Tk has what some people call an unorthodox model for tabbing. It does in fact have an error in its tab handling.

This can be shown by comparing the operation of the text widget using the default tabs and then using defined tabs based on the equivalent 8 characters.

The Fix

Apply this Tab Fix patch to the tk 8.3 core for file ./generic/tkTextDisp.c and tabs will perform as most people expect. (Change to the source directory for tk and then the subdirectory generic and use the command patch < TabFix.dif, check there are no errors and then recompile as per normal.)

FootNote

I have given up attempting to communicate the problem to scriptics. I cannot believe that the existing tab handling was designed to operate as it does. Anyone who can explain to me why tabbing should operate as scriptics have dictated please contact me and explain what is to be gained by  swimming against the tide.  

Mail