* tkcon.tcl (edit): prevent file edit from undoing loading of file
authorJeff Hobbs <hobbs@users.sourceforge.net>
Tue, 20 Oct 2015 21:41:36 +0000 (21:41 +0000)
committerJeff Hobbs <hobbs@users.sourceforge.net>
Tue, 20 Oct 2015 21:41:36 +0000 (21:41 +0000)
[Bug #52] (budyak)

ChangeLog
tkcon.tcl

index 8900970275af960e4b4fd407ab359c2b7e9d6a45..958592d8a5013c8185eb6d51e58f9dfa93276cee 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-20  Jeff Hobbs  <jeffh@ActiveState.com>
+
+       * tkcon.tcl (edit): prevent file edit from undoing loading of file
+       [Bug #52] (budyak)
+
 2014-09-09  Jeff Hobbs  <jeffh@ActiveState.com>
 
        * tkcon.tcl (::tkcon::SaveHistory): save history at each command
index f3ad06f8d76b3f968f421d44abff4cdbf03c42b0..b83bd65c22dcf21278e6226b46bf02974e3f53ed 100755 (executable)
--- 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) {}]} {