This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients fresh_nick, serhiy.storchaka, terry.reedy
Date 2016-01-16.10:29:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452940188.87.0.197978315503.issue26085@psf.upfronthosting.co.za>
In-reply-to
Content
You should have uploaded your .py file.  Mine is attached, with fix added.  Anyway, confirmed with 3.5.1, Win10.  Slightly more bizarre than described, in that misspelling disappears on even insertion and reappears in odd insertion.

this worsk
this worksthis works
this worksthis worksthis worsk

Even stranger, printing the txt to Shell after the insertion shows the opposite parity.

this works
this worksthis worsk
this worksthis worksthis works

Binding to another key removes the problem.  By experiment, ^t in Text means 'transpose chars to left and right of cursor and move cursor right' or equivalently, 'move char to right before the one on left'.  So 'abc|def' becomes 'abdc|ef' (where '|' here represents the cursor, not a character.  The exception is that at the end of the text, the two chars to the left are transposed, so that 'abc|' becomes 'acb|'.

Tk.bind has an 'add' parameter that defaults to None, which should mean 'replace previous bindings'.  But I suspect that this only applies to user-added bindings, so not replacing a default Text binding is not considered a bug.

Serhiy, am I correct here or is this a tk or tkinter bug?

In fact, it seems that this default binding cannot be unbound.  Adding 'txt.unbind('<Control-c>') did not work.  Adding "return 'break'" at the end of the callback does work.

Bottom line: make sure that you bind to an unused sequence or add the return to disable any unused binding you do not know about.

Our doc is deficient, but correcting that is beyond the scope of this issue.  Unless I have missed something, this should be closed as 'not a bug'.
History
Date User Action Args
2016-01-16 10:29:48terry.reedysetrecipients: + terry.reedy, serhiy.storchaka, fresh_nick
2016-01-16 10:29:48terry.reedysetmessageid: <1452940188.87.0.197978315503.issue26085@psf.upfronthosting.co.za>
2016-01-16 10:29:48terry.reedylinkissue26085 messages
2016-01-16 10:29:47terry.reedycreate