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