diff -r 243b06d0e230 -r 03c4a3e4ddd2 UIHelpTool.st --- a/UIHelpTool.st Sun Sep 26 16:14:08 1999 +0200 +++ b/UIHelpTool.st Mon Sep 27 13:48:04 1999 +0200 @@ -974,43 +974,48 @@ listSelection:aSelection "sets current selection" - |txt view sel| - - aSelection isNil - ifTrue: [(builder componentAt: #listOfHelpKeysView) selection: nil] - ifFalse: [(dictionary includesKey: aSelection asSymbol) ifFalse: [self findHelpSpecForKey: aSelection]]. + |txt view selection| - aSelection isNumber ifTrue:[ - aSelection ~~ 0 ifTrue:[ - sel := self listChannel value at:aSelection - ] - ] ifFalse:[ - aSelection size ~~ 0 ifTrue:[ - sel := aSelection withoutSeparators. - sel size == 0 ifTrue:[ - sel := nil + aSelection notNil ifTrue:[ + aSelection isNumber ifTrue:[ + aSelection ~~ 0 ifTrue:[ + selection := self listChannel value at:aSelection ifAbsent:nil + ] + ] ifFalse:[ + selection := aSelection withoutSeparators. + + selection size == 0 ifTrue:[ + selection := nil ] ] ]. - listSelection = sel ifFalse:[ - listSelection := sel. - - modifiedHolder notNil ifTrue:[ - modifiedHolder value:true. - ]. + selection isNil ifTrue:[ + (builder componentAt:#listOfHelpKeysView) selection:nil + ] ifFalse:[ + (dictionary includesKey:selection asSymbol) ifFalse:[ + self findHelpSpecForKey:selection + ] + ]. + listSelection == selection ifTrue:[ + ^ self + ]. + listSelection := selection. - (view := self editTextView) notNil ifTrue:[ - listSelection notNil ifTrue:[ - txt := dictionary at:(listSelection asSymbol) ifAbsent:nil. + modifiedHolder notNil ifTrue:[ + modifiedHolder value:true. + ]. - (txt isNil or:[maxCharsPerLine isNil]) ifFalse:[ - txt := UIPainter convertString:(txt asString) maxLineSize:maxCharsPerLine skipLineFeed:false. - ] - ]. - view contents:txt. - view modified:false. - ] + (view := self editTextView) notNil ifTrue:[ + listSelection notNil ifTrue:[ + txt := dictionary at:(listSelection asSymbol) ifAbsent:nil. + + (txt isNil or:[maxCharsPerLine isNil]) ifFalse:[ + txt := UIPainter convertString:(txt asString) maxLineSize:maxCharsPerLine skipLineFeed:false. + ] + ]. + view contents:txt. + view modified:false. ] ! !