# HG changeset patch # User Claus Gittinger # Date 857155628 -3600 # Node ID 73877901fa7d81c8b26fd3a6625242ddde33e288 # Parent 0ffa5c8a2b74c3a49285c9b17df917f23a65f94e redefined #selectAll to select nothing if there is nothing and the whole contents, if there is any; looks better. diff -r 0ffa5c8a2b74 -r 73877901fa7d EditField.st --- a/EditField.st Fri Feb 28 15:29:48 1997 +0100 +++ b/EditField.st Fri Feb 28 19:47:08 1997 +0100 @@ -1894,6 +1894,26 @@ !EditField methodsFor:'selections'! +selectAll + "select the whole text. + redefined to send super selectFrom... since we dont want the + cursor to be moved in this case." + + |len| + + list isNil ifTrue:[ + self unselect + ] ifFalse:[ + len := (self listAt:1) size. + len ~~ 0 ifTrue:[ + super selectFromLine:1 col:1 toLine:1 col:len. + ]. + typeOfSelection := nil + ] + + "Modified: 28.2.1997 / 19:16:21 / cg" +! + validateNewSelection "make certain that only one line is ever selected" @@ -1905,5 +1925,5 @@ !EditField class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.83 1997-02-25 23:15:33 cg Exp $' + ^ '$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.84 1997-02-28 18:47:08 cg Exp $' ! !