From 84b72fc3a8ea15ccec3ebb4d4ac25e7f564b6e2c Mon Sep 17 00:00:00 2001 From: Jeff Hobbs Date: Tue, 20 Oct 2015 21:41:36 +0000 Subject: [PATCH] * tkcon.tcl (edit): prevent file edit from undoing loading of file [Bug #52] (budyak) --- ChangeLog | 5 +++++ tkcon.tcl | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8900970..958592d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-10-20 Jeff Hobbs + + * tkcon.tcl (edit): prevent file edit from undoing loading of file + [Bug #52] (budyak) + 2014-09-09 Jeff Hobbs * tkcon.tcl (::tkcon::SaveHistory): save history at each command diff --git a/tkcon.tcl b/tkcon.tcl index f3ad06f..b83bd65 100755 --- a/tkcon.tcl +++ b/tkcon.tcl @@ -3996,6 +3996,8 @@ proc edit {args} { $w.text insert 1.0 [join $args \n] } } + # prevent stuff above being "undoable" in newer Tk + catch { $w.text edit reset ; $w.text edit modified 0 } wm deiconify $w focus $w.text if {[string compare $opts(-find) {}]} { -- 2.23.0