Menu

#52 Clear undo stack after loading text into editor

None
closed-fixed
nobody
None
5
2015-10-20
2015-09-09
No

Otherwize I press Ctrl-Z and text disappear.
I'm new to tcl, but you seem need adding two lines:

    $w.text edit reset
    $w.text edit modified 0

near the end of "proc edit", before wm deiconify

Discussion

  • Jeffrey Hobbs

    Jeffrey Hobbs - 2015-10-20

    commited

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2015-10-20
    • status: open --> closed-fixed
     
    • Denis Budyak

      Denis Budyak - 2015-10-22

      Hi!

      Meanwhile I'm developing my own fork of tkcon. It is called clcon and
      represents an IDE for Common Lisp. As it's client part is written in
      tcl, it can some tcl code to borrow. E.g. now I have prototype quality
      multi-tabbed text editor with save, find, replace, recent file list.

      My latest invention is "find source" for tcl, which allows access
      source file where procedure is defined just by its name, see

      https://bitbucket.org/budden/clcon/src/default/record_definition.tcl

      Feel free to borrow my code :)

       
      • Jeffrey Hobbs

        Jeffrey Hobbs - 2015-10-22

        You may be interested to look at the TIP #280 code that added enhanced stack frame tracing capabilities, starting in Tcl 8.5

        http://www.tcl.tk/cgi-bin/tct/tip/280 http://www.tcl.tk/cgi-bin/tct/tip/280

        I didn’t incorporate it into tkcon (though it’s a natural fit for such a tool) because it require Tcl 8.5, and I still base on 8.4.

         
        • Denis Budyak

          Denis Budyak - 2015-10-22

          Thanks!

          Maybe I'm wrong, but it looks like with this TIP I need to run proc to
          learn where it is defined. It is not always convenient. When I read
          code in the IDE, I want just to set cursor at the name of the proc and
          then press some magic key to get to the source. I don't see how this
          TIP can be useful there.

          2015-10-22 18:47 GMT+03:00, Jeffrey Hobbs hobbs@users.sf.net:

          You may be interested to look at the TIP #280 code that added enhanced stack
          frame tracing capabilities, starting in Tcl 8.5

          http://www.tcl.tk/cgi-bin/tct/tip/280
          http://www.tcl.tk/cgi-bin/tct/tip/280

          I didn’t incorporate it into tkcon (though it’s a natural fit for such a
          tool) because it require Tcl 8.5, and I still base on 8.4.

           

Log in to post a comment.