send a sigWINCH whenever the views size changes.
--- a/TerminalView.st Thu Jun 11 22:48:37 1998 +0200
+++ b/TerminalView.st Thu Jun 11 22:49:21 1998 +0200
@@ -1,10 +1,10 @@
TextCollector subclass:#TerminalView
- instanceVariableNames:'inStream outStream readerProcess shellPid kbdSequences
- escapeSequenceTree currentSequence currentTree kbdMap
- escapeLeadingChars numberOfColumns numberOfLines'
- classVariableNames:''
- poolDictionaries:''
- category:'Views-TerminalViews'
+ instanceVariableNames:'inStream outStream readerProcess shellPid kbdSequences
+ escapeSequenceTree currentSequence currentTree kbdMap
+ escapeLeadingChars numberOfColumns numberOfLines'
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Views-TerminalViews'
!
!TerminalView class methodsFor:'documentation'!
@@ -70,7 +70,7 @@
top := StandardSystemView new.
scr := HVScrollableView for:self in:top.
- scr autoHideHorizontalScrollBar:true.
+"/ scr autoHideHorizontalScrollBar:true.
scr horizontalMini:true.
scr origin:0.0@0.0 corner:1.0@1.0.
vt52 := scr scrolledView.
@@ -85,8 +85,6 @@
"
VT100TerminalView openShell
"
-
- "Modified: / 11.6.1998 / 18:11:19 / cg"
! !
!TerminalView methodsFor:'accessing'!
@@ -227,6 +225,21 @@
shellTerminated
self warn:'shell terminated'.
self closeDownShell.
+!
+
+sizeChanged:how
+ super sizeChanged:how.
+
+ OperatingSystem
+ setWindowSizeOnFileDescriptor:(inStream fileDescriptor)
+ width:(innerWidth // font width)
+ height:(nFullLinesShown).
+
+ shellPid notNil ifTrue:[
+ OperatingSystem sendSignal:OperatingSystem sigWINCH to:shellPid
+ ]
+
+ "Modified: / 11.6.1998 / 22:43:31 / cg"
! !
!TerminalView methodsFor:'functions'!
@@ -294,6 +307,14 @@
super cursorLeft
!
+doCursorLeft:n
+ n timesRepeat:[
+ super cursorLeft
+ ]
+
+ "Created: / 11.6.1998 / 22:30:00 / cg"
+!
+
doCursorNewLine
super cursorDown:1
@@ -318,6 +339,14 @@
super cursorUp
!
+doCursorUp:n
+ n timesRepeat:[
+ super cursorUp
+ ]
+
+ "Created: / 11.6.1998 / 22:29:46 / cg"
+!
+
doSendInterrupt
OperatingSystem sendSignal:(OperatingSystem sigINT) to:shellPid negated.
@@ -541,8 +570,10 @@
monitor:[
|e|
- e := IdentityDictionary new.
- e at:#TERM put:(self terminalType).
+ e := Dictionary new.
+ e at:'TERM' put:(self terminalType).
+ e at:'LINES' put:nil.
+ e at:'COLUMNS' put:nil.
OperatingSystem
exec:'/bin/sh'
@@ -582,7 +613,7 @@
VT100TerminalView openShell
"
- "Modified: / 10.6.1998 / 18:42:23 / cg"
+ "Modified: / 11.6.1998 / 22:28:53 / cg"
! !
!TerminalView methodsFor:'menu'!
@@ -671,5 +702,5 @@
!TerminalView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/TerminalView.st,v 1.21 1998-06-11 17:11:45 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/TerminalView.st,v 1.22 1998-06-11 20:49:21 cg Exp $'
! !