# HG changeset patch # User Claus Gittinger # Date 1327488758 -3600 # Node ID 646cd7c5513e8f524c4a9e510226857a0fe6041e # Parent fe77e479d95ae0f691e1d0028c3a2781df789897 comment/format in: #characterEncoding: changed: #selection diff -r fe77e479d95a -r 646cd7c5513e TextView.st --- a/TextView.st Wed Jan 25 11:52:07 2012 +0100 +++ b/TextView.st Wed Jan 25 11:52:38 2012 +0100 @@ -681,7 +681,9 @@ |encodingSymOrNil| - encodingSymOrNil := encodingArg isNil ifTrue:[#'iso10646-1'] ifFalse:[encodingArg asSymbol]. + encodingSymOrNil := encodingArg isNil + ifTrue:[#'iso10646-1'] + ifFalse:[encodingArg asSymbol]. characterEncoding ~~ encodingSymOrNil ifTrue:[ "/ TODO: reencode contents if required. @@ -692,6 +694,8 @@ ]. characterEncoding := encodingSymOrNil. ]. + + "Modified (format): / 25-01-2012 / 00:28:27 / cg" ! characterPositionOfSelection @@ -4254,13 +4258,13 @@ selectionStartLine isNil ifTrue:[^ nil]. sel := self textFromLine:selectionStartLine col:selectionStartCol toLine:selectionEndLine col:selectionEndCol. sel notNil ifTrue:[ - (characterEncoding ? #'unicode') ~~ #'unicode' ifTrue:[ - sel := sel encodeFrom:characterEncoding into:#'unicode' + (characterEncoding ? #'iso10646-1' "eg unicode") ~~ #'iso10646-1' ifTrue:[ + sel := sel encodeFrom:characterEncoding into:#'iso10646-1' ]. ]. ^ sel - "Modified: / 22.2.2000 / 23:54:54 / cg" + "Modified (comment): / 25-01-2012 / 00:29:09 / cg" ! selectionAsString @@ -4374,11 +4378,11 @@ !TextView class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.326 2011-10-05 14:12:30 az Exp $' + ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.327 2012-01-25 10:52:38 cg Exp $' ! version_CVS - ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.326 2011-10-05 14:12:30 az Exp $' + ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.327 2012-01-25 10:52:38 cg Exp $' ! ! TextView initialize!