| Store | Cart

Re: [TCLCORE] TIP #449: [text] undo/redo to Return Range of Characters

From: Donald Arseneau <a...@triumf.ca>
Sat, 11 Jun 2016 17:19:27 -0700 (PDT)
François Vogel <fvog...@free.fr> proposed:
>  EXAMPLE> =========>>      package require Tk>>      pack [text .t -undo true]>      .t insert end "Hello World.\n">      .t edit separator>      .t insert end "Again hello.\n">>      .t edit undo  ; # will now return {2.0 3.0}>      .t edit redo  ; # will now return {2.0 3.0}

This seems asymmetric with the indices returned by undo
referring to the text as it was before the undo, whereas
the indices from redo refer to the text after the redo.

Would this be the same if the undone action was delete
rather than insert?

I would think the useful indices would always point to the
text as it is now, after the undo/redo, even if that is not
a range at all.

Using manual separators, as shown, brings up the possibility
that an undo operates on several ranges of characters.

Donald Arseneau, TRIUMF CMMS, a...@triumf.ca


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Tcl-Core mailing list
Tcl-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tcl-core

Recent Messages in this Thread
Donald Arseneau Jun 12, 2016 12:19 am
Francois Vogel Jun 12, 2016 08:13 am
Francois Vogel Jul 05, 2016 08:53 pm
Francois Vogel Jul 06, 2016 05:05 pm
Messages in this thread