--- a/TerminalView.st Sat Jun 20 20:28:31 1998 +0200
+++ b/TerminalView.st Sat Jun 20 20:31:05 1998 +0200
@@ -220,7 +220,7 @@
]
"Created: / 12.6.1998 / 22:34:39 / cg"
- "Modified: / 12.6.1998 / 22:35:38 / cg"
+ "Modified: / 20.6.1998 / 19:45:28 / cg"
!
defineWindowSize
@@ -232,13 +232,14 @@
"/ Transcript showCR:'VT100: cannot change windowSize'.
].
numberOfLines := nFullLinesShown.
+"/ Transcript showCR:'VT100: changed len to ', numberOfLines printString.
].
shellPid notNil ifTrue:[
OperatingSystem sendSignal:OperatingSystem sigWINCH to:shellPid
]
"Created: / 11.6.1998 / 22:51:39 / cg"
- "Modified: / 17.6.1998 / 16:18:59 / cg"
+ "Modified: / 20.6.1998 / 20:29:13 / cg"
!
keyPress:aKey x:x y:y
@@ -364,33 +365,40 @@
(l size >= (cursorCol-1)) ifTrue:[
l notNil ifTrue:[
l := l copyTo:cursorCol-1.
- self at:cursorLine put:l.
+ self withoutRedrawAt:cursorLine put:l.
+ self invalidateLine:cursorLine
+ "/ self at:cursorLine put:l.
]
]
"Created: / 10.6.1998 / 14:45:01 / cg"
- "Modified: / 12.6.1998 / 22:27:54 / cg"
+ "Modified: / 20.6.1998 / 19:10:21 / cg"
!
doCursorDown:n
- |wasOn|
+ |wasOn rEnd|
- cursorLine + 1 - firstLineShown + n > rangeEndLine ifFalse:[
+"/ rangeEndLine == numberOfLines ifTrue:[
+"/ ^ super cursorDown:n
+"/ ].
+ cursorLine + 1 - firstLineShown + n <= rangeEndLine ifTrue:[
"/ no special action req'd
^ super cursorDown:n
].
+
n timesRepeat:[
wasOn := self hideCursor.
- cursorVisibleLine == rangeEndLine ifTrue:[
- self deleteLine:rangeStartLine.
- self insertLine:'' before:rangeEndLine
+ rEnd := rangeEndLine+firstLineShown-1.
+ cursorLine == rEnd ifTrue:[
+ self deleteLine:(rangeStartLine+firstLineShown-1).
+ self insertLine:'' before:rEnd.
] ifFalse:[
super cursorDown
].
- self makeCursorVisibleAndShowCursor:wasOn.
+ wasOn ifTrue:[self showCursor]. "/ self makeCursorVisibleAndShowCursor:wasOn.
]
- "Modified: / 18.6.1998 / 14:30:07 / cg"
+ "Modified: / 20.6.1998 / 20:29:39 / cg"
!
doCursorHome
@@ -425,19 +433,23 @@
!
doCursorUp:n
- |wasOn|
+ |wasOn rStart|
- cursorLine + 1 - firstLineShown - n < rangeStartLine ifFalse:[
+"/ rangeStartLine == 1 ifTrue:[
+"/ ^ super cursorUp:n
+"/ ].
+ cursorLine + 1 - firstLineShown - n >= rangeStartLine ifTrue:[
"/ no special action req'd
^ super cursorUp:n
].
n timesRepeat:[
wasOn := self hideCursor.
- cursorVisibleLine == rangeStartLine ifTrue:[
- rangeEndLine <= list size ifTrue:[
- self deleteLine:rangeEndLine.
- self insertLine:'' before:rangeStartLine
- ]
+ rStart := rangeStartLine+firstLineShown-1.
+ cursorLine == rStart ifTrue:[
+ (rangeEndLine+firstLineShown-1) <= list size ifTrue:[
+ self deleteLine:(rangeEndLine+firstLineShown-1).
+ self insertLine:'' before:rStart.
+ ].
] ifFalse:[
super cursorUp
].
@@ -445,7 +457,7 @@
]
"Created: / 11.6.1998 / 22:29:46 / cg"
- "Modified: / 20.6.1998 / 17:35:09 / cg"
+ "Modified: / 20.6.1998 / 20:30:34 / cg"
!
doSendInterrupt
@@ -542,7 +554,7 @@
trimBlankLines := true.
numberOfColumns := 80.
- numberOfLines := 25.
+ numberOfLines := 24.
rangeStartLine := 1.
rangeEndLine := numberOfLines.
@@ -556,7 +568,7 @@
VT100TerminalView openShell
"
- "Modified: / 20.6.1998 / 18:21:19 / cg"
+ "Modified: / 20.6.1998 / 20:06:49 / cg"
!
initializeKeyboardMap
@@ -796,11 +808,11 @@
(self sensor hasEvent:#processInput:n: for:self) ifFalse:[
self endEntry.
self showCursor.
- self makeCursorVisible.
+ "/ self makeCursorVisible.
].
"Created: / 10.6.1998 / 17:26:09 / cg"
- "Modified: / 17.6.1998 / 16:16:04 / cg"
+ "Modified: / 20.6.1998 / 19:18:07 / cg"
! !
!TerminalView methodsFor:'queries'!
@@ -808,9 +820,9 @@
preferredExtent
^ (fontWidth * numberOfColumns + (leftMargin * 2))
@
- (self heightForLines:25)
+ ((self heightForLines:numberOfLines) + 8)
- "Modified: / 12.6.1998 / 22:37:30 / cg"
+ "Modified: / 20.6.1998 / 20:06:57 / cg"
!
terminalType
@@ -852,5 +864,5 @@
!TerminalView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/TerminalView.st,v 1.42 1998-06-20 16:21:30 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/TerminalView.st,v 1.43 1998-06-20 18:31:05 cg Exp $'
! !