--- a/EditTextView.st Tue Nov 02 13:30:18 2010 +0100
+++ b/EditTextView.st Mon Nov 08 14:45:43 2010 +0100
@@ -3501,8 +3501,8 @@
self checkModificationsAllowed ifFalse:[ ^ self].
aCharacter == (Character cr) ifTrue:[
- self splitLine:lineNr before:colNr.
- ^ self
+ self splitLine:lineNr before:colNr.
+ ^ self
].
drawCharacterOnly := false.
@@ -3511,86 +3511,90 @@
lineSize := line size.
self st80EditMode ifFalse:[
- (trimBlankLines
- and:[colNr > lineSize
- and:[aCharacter == Character space]]) ifTrue:[
- ^ self
- ]
+ (trimBlankLines
+ and:[colNr > lineSize
+ and:[aCharacter == Character space]]) ifTrue:[
+ ^ self
+ ]
].
(lineSize == 0) ifTrue:[
- newLine := aCharacter asString species new:colNr.
- drawCharacterOnly := true
+ newLine := aCharacter asString species new:colNr.
+ drawCharacterOnly := true
] ifFalse: [
- (colNr > lineSize) ifTrue: [
- colNr == (lineSize +1) ifTrue:[
- attribute := line emphasisAt:lineSize
- ].
- newLine := line species new:colNr.
- newLine replaceFrom:1 to:lineSize with:line startingAt:1.
- drawCharacterOnly := true
- ] ifFalse: [
- attribute := line emphasisAt:colNr.
- newLine := line species new:(lineSize + 1).
-
- newLine replaceFrom:1 to:(colNr - 1) with:line startingAt:1.
- newLine replaceFrom:(colNr + 1) to:(lineSize + 1) with:line startingAt:colNr
- ]
+ (colNr > lineSize) ifTrue: [
+ colNr == (lineSize +1) ifTrue:[
+ attribute := line emphasisAt:lineSize
+ ].
+ newLine := line species new:colNr.
+ newLine replaceFrom:1 to:lineSize with:line startingAt:1.
+ drawCharacterOnly := true
+ ] ifFalse: [
+ attribute := line emphasisAt:colNr.
+ newLine := line species new:(lineSize + 1).
+
+ newLine replaceFrom:1 to:(colNr - 1) with:line startingAt:1.
+ newLine replaceFrom:(colNr + 1) to:(lineSize + 1) with:line startingAt:colNr
+ ]
].
aCharacter asString bitsPerCharacter > newLine bitsPerCharacter ifTrue:[
- newLine := aCharacter asString species fromString:newLine.
- line isText ifTrue:[
- newLine := newLine asText
- ]
+ newLine := aCharacter asString species fromString:newLine.
+ line isText ifTrue:[
+ newLine := newLine asText
+ ]
].
newLine at:colNr put:aCharacter.
attribute notNil ifTrue:[
- newLine emphasisAt:colNr put:attribute.
+ newLine emphasisAt:colNr put:attribute.
].
aCharacter == (Character tab) ifTrue:[
- newLine := self withTabsExpanded:newLine.
- drawCharacterOnly := false
+ newLine := self withTabsExpanded:newLine.
+ drawCharacterOnly := false
].
list at:lineNr put:newLine.
widthOfWidestLine notNil ifTrue:[
- widthOfWidestLine := widthOfWidestLine max:(self widthOfLineString:line).
+ widthOfWidestLine := widthOfWidestLine max:(self widthOfLineString:line).
].
self textChanged.
shown ifTrue:[
- "/ care for italic text - in this case, we must also
- "/ redraw the character before the insertion in order
- "/ to fix the slanted piece of the character.
- "/ (but we must clip, to avoid destoying the character before)
- (newLine notNil and:[newLine isText]) ifTrue:[
- colNr > 1 ifTrue:[
- cursorVisibleLine notNil ifTrue:[
- oldClip := self clippingRectangleOrNil.
- x := (self xOfCol:colNr-1 inVisibleLine:cursorVisibleLine) - viewOrigin x.
- y := self yOfVisibleLine:cursorVisibleLine.
- drawCharacterOnly ifTrue:[
- self clippingRectangle:(x@y extent:((font width * 2) @ fontHeight)).
- self redrawLine:lineNr from:colNr-1 to:colNr
- ] ifFalse:[
- self clippingRectangle:(x@y extent:((width - x) @ fontHeight)).
- self redrawLine:lineNr from:colNr-1
- ].
- self clippingRectangle:oldClip.
- ].
- ^ self.
- ].
- ].
- drawCharacterOnly ifTrue:[
- self redrawLine:lineNr col:colNr
- ] ifFalse:[
- self redrawLine:lineNr from:colNr
- ]
+ "/ care for italic text - in this case, we must also
+ "/ redraw the character before the insertion in order
+ "/ to fix the slanted piece of the character.
+ "/ (but we must clip, to avoid destoying the character before)
+ (newLine notNil and:[newLine isText]) ifTrue:[
+ colNr > 1 ifTrue:[
+ cursorVisibleLine notNil ifTrue:[
+ oldClip := self clippingRectangleOrNil.
+ x := (self xOfCol:colNr-1 inVisibleLine:cursorVisibleLine) - viewOrigin x.
+ y := self yOfVisibleLine:cursorVisibleLine.
+ drawCharacterOnly ifTrue:[
+ self clippingRectangle:(x@y extent:((font width * 2) @ fontHeight)).
+ self redrawLine:lineNr from:colNr-1 to:colNr
+ ] ifFalse:[
+ self clippingRectangle:(x@y extent:((width - x) @ fontHeight)).
+ self redrawLine:lineNr from:colNr-1
+ ].
+ self clippingRectangle:oldClip.
+ ].
+ ^ self.
+ ].
+ ].
+ font hasOverlappingCharacters ifTrue:[
+ self invalidateLine:lineNr.
+ ] ifFalse:[
+ drawCharacterOnly ifTrue:[
+ self redrawLine:lineNr col:colNr
+ ] ifFalse:[
+ self redrawLine:lineNr from:colNr
+ ]
+ ]
]
- "Modified: / 20.6.1998 / 18:19:22 / cg"
+ "Modified: / 08-11-2010 / 14:45:07 / cg"
!
basicMergeLine:lineNr removeBlanks:removeBlanks
@@ -7719,9 +7723,9 @@
!EditTextView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.493 2010-08-25 20:02:22 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.494 2010-11-08 13:45:43 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.493 2010-08-25 20:02:22 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.494 2010-11-08 13:45:43 cg Exp $'
! !