jayduhon / inferno-os

Automatically exported from code.google.com/p/inferno-os
2 stars 0 forks source link

^k and ^d modify text in tk text widgets even when in disabled state #253

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
open a program using a disabled text widgets such as wm/man.
press button1 in the middle of a line, hit ctrl-d a few times and ctrl-k.

What is the expected output? What do you see instead?
the text should stay unmodified.
instead, the character after the cursor is deleted for ^d and from the cursor 
to the end of the line for ^k.

Which operating system are you using?
latest inferno-os.

Please provide any additional information below.
attached is a patch that prevents text changes for ^d and ^k in disabled text 
widgets.
the internal tk function "tkTextDelIns" checks for the Tkdisabled property.  
"delete" does not (which is correct).  i also changed the binding for TkKey|DEL 
because the "+c" after "tkTextDelIns" was not recognized by tktextdelins(), 
removing 1 char is the default.

Original issue reported on code.google.com by mechiel@ueber.net on 15 Mar 2011 at 6:55

Attachments:

GoogleCodeExporter commented 9 years ago
committed changeset 497:8354a53c9bd8

Original comment by Charles....@gmail.com on 15 Mar 2011 at 11:08