[GB.FORM.TERMINAL]
* BUG: TerminalView: Refresh process output every 250ms at least. Don't wait for the internal 64K buffer to be filled. git-svn-id: svn://localhost/gambas/trunk@7860 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
45a12f36a8
commit
3d0be81f4e
5 changed files with 13 additions and 8 deletions
|
@ -1,10 +1,10 @@
|
|||
# Gambas Project File 3.0
|
||||
# Compiled with Gambas 3.8.90
|
||||
# Compiled with Gambas 3.9.90
|
||||
Title=Gambas 3
|
||||
Startup=Project
|
||||
RedirectStderr=1
|
||||
Icon=img/logo/logo-ide.png
|
||||
Version=3.8.90
|
||||
Version=3.9.90
|
||||
VersionFile=1
|
||||
Component=gb.image
|
||||
Component=gb.gui.qt
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[Component]
|
||||
Key=gb.form.terminal
|
||||
Version=3.8.90
|
||||
Version=3.9.90
|
||||
State=1
|
||||
Authors=Benoît Minisini,Fabien Bodard
|
||||
Needs=Form
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Gambas Project File 3.0
|
||||
# Compiled with Gambas 3.8.90
|
||||
# Compiled with Gambas 3.9.90
|
||||
Title=Gambas Terminal control
|
||||
Startup=FTestTerminalView
|
||||
Icon=terminalview.png
|
||||
Version=3.8.90
|
||||
Version=3.9.90
|
||||
VersionFile=1
|
||||
Component=gb.image
|
||||
Component=gb.gui
|
||||
|
|
|
@ -46,6 +46,7 @@ Private $hMouseTimer As Timer
|
|||
Private $bTermUseMouse As Boolean
|
||||
|
||||
Private $hProcess As Process
|
||||
Private $fStart As Float
|
||||
|
||||
Private $hFilter As TerminalFilter
|
||||
Public _DisableFilter As Integer
|
||||
|
@ -668,6 +669,8 @@ Public Sub Exec(Command As String[], Optional Environment As String[]) As Proces
|
|||
aEnv = ["TERM=xterm"]
|
||||
If Environment Then aEnv.Insert(Environment)
|
||||
|
||||
$fStart = Timer
|
||||
|
||||
$hProcess = Exec Command With aEnv For Input Output As "Process"
|
||||
$hProcess.Term.Echo = True
|
||||
$hProcess.Term.Resize($hScreen.Width, $hScreen.Height)
|
||||
|
@ -685,6 +688,8 @@ Public Sub Shell(Command As String, Optional Environment As String[]) As Process
|
|||
aEnv = ["TERM=xterm"]
|
||||
If Environment Then aEnv.Insert(Environment)
|
||||
|
||||
$fStart = Timer
|
||||
|
||||
$hProcess = Shell Command With aEnv For Input Output As "Process"
|
||||
$hProcess.Term.Echo = True
|
||||
$hProcess.Term.Resize($hScreen.Width, $hScreen.Height)
|
||||
|
@ -706,11 +711,10 @@ Public Sub Process_Read()
|
|||
Dim sData As String
|
||||
|
||||
sData = Read #$hProcess, Lof($hProcess)
|
||||
'Debug Quote(sData)
|
||||
|
||||
$sBuffer &= sData
|
||||
|
||||
If Len($sBuffer) > 65536 Then
|
||||
If Len($sBuffer) > 65536 Or If (Timer - $fStart) > 0.25 Then
|
||||
$hOutputTimer.Trigger
|
||||
Else
|
||||
$hOutputTimer.Restart
|
||||
|
@ -727,6 +731,7 @@ End
|
|||
|
||||
Public Sub OutputTimer_Timer()
|
||||
|
||||
$fStart = Timer
|
||||
$hFilter.OutputTo(Me, $hScreen, $hProcess, $sBuffer)
|
||||
$sBuffer = ""
|
||||
$hOutputTimer.Stop
|
||||
|
|
|
@ -2,7 +2,7 @@ FTestTerminalView
|
|||
Gambas Terminal control
|
||||
0
|
||||
0
|
||||
3.8.90
|
||||
3.9.90
|
||||
|
||||
gb.image
|
||||
gb.gui
|
||||
|
|
Loading…
Reference in a new issue