need a self>>contentsChanged when inserting lines.
--- a/ETxtView.st Sat Feb 08 12:46:20 1997 +0100
+++ b/ETxtView.st Sat Feb 08 13:13:06 1997 +0100
@@ -2286,20 +2286,20 @@
line := aString.
line notNil ifTrue:[
- line isString ifTrue:[
- line isBlank ifTrue:[
- line := nil
- ] ifFalse:[
- (line occurrencesOf:(Character tab)) == 0 ifFalse:[
- line := self withTabsExpanded:line
- ]
- ]
- ]
+ line isString ifTrue:[
+ line isBlank ifTrue:[
+ line := nil
+ ] ifFalse:[
+ (line occurrencesOf:(Character tab)) == 0 ifFalse:[
+ line := self withTabsExpanded:line
+ ]
+ ]
+ ]
].
list isNil ifTrue: [
- list := StringCollection new:lineNr
+ list := StringCollection new:lineNr
] ifFalse: [
- list grow:((list size + 1) max:lineNr)
+ list grow:((list size + 1) max:lineNr)
].
"I have changed 'replaceFrom:to:with:startingAt:' to correctly handle
@@ -2307,13 +2307,16 @@
"
index := list size.
[index > lineNr] whileTrue: [
- pIndex := index - 1.
- list at:index put:(list at:pIndex).
- index := pIndex
+ pIndex := index - 1.
+ list at:index put:(list at:pIndex).
+ index := pIndex
].
"
list replaceFrom:(lineNr + 1) to:(list size) with:list startingAt:lineNr.
list at:lineNr put:line.
+ self contentsChanged
+
+ "Modified: 8.2.1997 / 12:38:52 / cg"
!
withoutRedrawInsertLines:lines from:start to:end before:lineNr
@@ -2326,24 +2329,24 @@
nLines := end - start + 1.
newLines := Array new:(lines size).
start to:end do:[:index |
- newLine := lines at:index.
- newLine notNil ifTrue:[
- newLine isString ifTrue:[
- newLine isBlank ifTrue:[
- newLine := nil
- ] ifFalse:[
- (newLine occurrencesOf:(Character tab)) == 0 ifFalse:[
- newLine := self withTabsExpanded:newLine
- ]
- ]
- ]
- ].
- newLines at:index put:newLine
+ newLine := lines at:index.
+ newLine notNil ifTrue:[
+ newLine isString ifTrue:[
+ newLine isBlank ifTrue:[
+ newLine := nil
+ ] ifFalse:[
+ (newLine occurrencesOf:(Character tab)) == 0 ifFalse:[
+ newLine := self withTabsExpanded:newLine
+ ]
+ ]
+ ]
+ ].
+ newLines at:index put:newLine
].
list isNil ifTrue: [
- list := StringCollection new:(lineNr + nLines + 1)
+ list := StringCollection new:(lineNr + nLines + 1)
] ifFalse: [
- list grow:((list size + nLines) max:(lineNr + nLines - 1))
+ list grow:((list size + nLines) max:(lineNr + nLines - 1))
].
"I have changed 'replaceFrom:to:with:startingAt:' to correctly handle
@@ -2351,13 +2354,16 @@
"
index := list size.
[index > lineNr] whileTrue: [
- pIndex := index - 1.
- list at:index put:(list at:pIndex).
- index := pIndex
+ pIndex := index - 1.
+ list at:index put:(list at:pIndex).
+ index := pIndex
].
"
list replaceFrom:(lineNr + nLines) to:(list size) with:list startingAt:lineNr.
list replaceFrom:lineNr to:(lineNr + nLines - 1) with:newLines startingAt:start.
+ self contentsChanged
+
+ "Modified: 8.2.1997 / 12:38:42 / cg"
!
withoutRedrawInsertStringWithoutCRs:aString atLine:lineNr col:colNr
@@ -3910,5 +3916,5 @@
!EditTextView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Attic/ETxtView.st,v 1.106 1997-01-29 12:24:42 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Attic/ETxtView.st,v 1.107 1997-02-08 12:13:06 cg Exp $'
! !
--- a/EditTextView.st Sat Feb 08 12:46:20 1997 +0100
+++ b/EditTextView.st Sat Feb 08 13:13:06 1997 +0100
@@ -2286,20 +2286,20 @@
line := aString.
line notNil ifTrue:[
- line isString ifTrue:[
- line isBlank ifTrue:[
- line := nil
- ] ifFalse:[
- (line occurrencesOf:(Character tab)) == 0 ifFalse:[
- line := self withTabsExpanded:line
- ]
- ]
- ]
+ line isString ifTrue:[
+ line isBlank ifTrue:[
+ line := nil
+ ] ifFalse:[
+ (line occurrencesOf:(Character tab)) == 0 ifFalse:[
+ line := self withTabsExpanded:line
+ ]
+ ]
+ ]
].
list isNil ifTrue: [
- list := StringCollection new:lineNr
+ list := StringCollection new:lineNr
] ifFalse: [
- list grow:((list size + 1) max:lineNr)
+ list grow:((list size + 1) max:lineNr)
].
"I have changed 'replaceFrom:to:with:startingAt:' to correctly handle
@@ -2307,13 +2307,16 @@
"
index := list size.
[index > lineNr] whileTrue: [
- pIndex := index - 1.
- list at:index put:(list at:pIndex).
- index := pIndex
+ pIndex := index - 1.
+ list at:index put:(list at:pIndex).
+ index := pIndex
].
"
list replaceFrom:(lineNr + 1) to:(list size) with:list startingAt:lineNr.
list at:lineNr put:line.
+ self contentsChanged
+
+ "Modified: 8.2.1997 / 12:38:52 / cg"
!
withoutRedrawInsertLines:lines from:start to:end before:lineNr
@@ -2326,24 +2329,24 @@
nLines := end - start + 1.
newLines := Array new:(lines size).
start to:end do:[:index |
- newLine := lines at:index.
- newLine notNil ifTrue:[
- newLine isString ifTrue:[
- newLine isBlank ifTrue:[
- newLine := nil
- ] ifFalse:[
- (newLine occurrencesOf:(Character tab)) == 0 ifFalse:[
- newLine := self withTabsExpanded:newLine
- ]
- ]
- ]
- ].
- newLines at:index put:newLine
+ newLine := lines at:index.
+ newLine notNil ifTrue:[
+ newLine isString ifTrue:[
+ newLine isBlank ifTrue:[
+ newLine := nil
+ ] ifFalse:[
+ (newLine occurrencesOf:(Character tab)) == 0 ifFalse:[
+ newLine := self withTabsExpanded:newLine
+ ]
+ ]
+ ]
+ ].
+ newLines at:index put:newLine
].
list isNil ifTrue: [
- list := StringCollection new:(lineNr + nLines + 1)
+ list := StringCollection new:(lineNr + nLines + 1)
] ifFalse: [
- list grow:((list size + nLines) max:(lineNr + nLines - 1))
+ list grow:((list size + nLines) max:(lineNr + nLines - 1))
].
"I have changed 'replaceFrom:to:with:startingAt:' to correctly handle
@@ -2351,13 +2354,16 @@
"
index := list size.
[index > lineNr] whileTrue: [
- pIndex := index - 1.
- list at:index put:(list at:pIndex).
- index := pIndex
+ pIndex := index - 1.
+ list at:index put:(list at:pIndex).
+ index := pIndex
].
"
list replaceFrom:(lineNr + nLines) to:(list size) with:list startingAt:lineNr.
list replaceFrom:lineNr to:(lineNr + nLines - 1) with:newLines startingAt:start.
+ self contentsChanged
+
+ "Modified: 8.2.1997 / 12:38:42 / cg"
!
withoutRedrawInsertStringWithoutCRs:aString atLine:lineNr col:colNr
@@ -3910,5 +3916,5 @@
!EditTextView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.106 1997-01-29 12:24:42 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.107 1997-02-08 12:13:06 cg Exp $'
! !