corrected twiddleLines

New Message Reply Date view Thread view Subject view Author view

From: Albert Davidson Chou (Al_Chou@CyberDude.com)
Date: 12 Mar 01, 14:54 EST


From: "Albert Davidson Chou" <Al_Chou@CyberDude.com>
Subject: corrected twiddleLines

Not that anyone seemed to care when I posted the initial version of this proc, 
but I found a bug in it when the current line had no characters on it except for 
the line-end character.  Here's the corrected version:

proc twiddleLines {} {
# Put the insertion point at the beginning of the current line.
    goto [lineStart [getPos]]
# Select from there to the end of the line.
    endLineSelect
# Extend the selection to include the carriage return at the end of the line.
    forwardCharSelect
    cut
    previousLine
    paste
}


Al
-- 
Albert Davidson Chou

Get answers to Mac questions at http://www.mac-mgrs.org/ .

___________________________________________________________________________
Visit http://www.visto.com/info, your free web-based communications center.
Visto.com. Life on the Dot.


_______________________________________________
AlphaTcl-developers mailing list
AlphaTcl-developers@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/alphatcl-developers


New Message Reply Date view Thread view Subject view Author view

This archive was generated by das@users.sourceforge.net with hypermail 2b29 on 31 Mar 01, 11:51 EST