Skip to content
Tcl Source Code View Ticket
Login

View Ticket

text widget "undo" crash

Closed / Invalid1380338fffffffffffffffffffffffffffffffffCreated 21 years agoUpdated 21 years ago
Descriptionplain2005-12-14 11:33:03
The following source code create a simple text widget 
with 2 keys binding :

alt-u (text undo)
alt-r (text redo)

When you type some chars in the text and then you make 
repeatedly alt-u and alt-r the tcl/tk 8.4.11
crash under win32 and linux i386 too (invalid memory 
reference).

Is it a bug ?

Thank you


-------------------------------------------------------
---------------------------------------------
#code start here

frame .f
pack .f -fill both -expand 1

text .f.testo -width 40 -height 10 -borderwidth 2 \
-setgrid 1 -undo 1 -maxundo 20 -autoseparators 0
pack .f.testo -fill both -expand 1


bind Text <Alt-r> {}
bind .f.testo <Alt-r> {

       catch { .f.testo edit redo }
}

bind Text <Alt-u> {}
bind .f.testo <Alt-u> {

catch { .f.testo edit undo }
}

bind .f.testo <KeyPress> {

        catch { .f.testo edit separator }
}


focus -force .f.testo
#code end here
-------------------------------------------------------
----------------------------------------------
dkfplain2005-12-14 20:08:54
Logged In: YES 
user_id=79902

Please resubmit to Tk tracker.
Log in (anonymous is fine) to add a comment.