TerminalView: Characters attributes are correctly kept when the screen size changes again.
[GB.FORM.TERMINAL] * BUG: TerminalView: Characters attributes are correctly kept when the screen size changes again.
This commit is contained in:
parent
8d66be984d
commit
c316a6827e
@ -63,6 +63,10 @@ Private Sub Compress(bFull As Boolean)
|
||||
|
||||
If bFull And If Attr.Count < Length Then
|
||||
iCount = Length - Attr.Count
|
||||
While iCount > 128
|
||||
aAttr.Add(Lsl(127, 9))
|
||||
iCount -= 128
|
||||
Wend
|
||||
aAttr.Add(Lsl(iCount - 1, 9))
|
||||
Endif
|
||||
|
||||
@ -72,33 +76,6 @@ Private Sub Compress(bFull As Boolean)
|
||||
|
||||
End
|
||||
|
||||
|
||||
' Public Sub GetAttr(hAttr As TerminalAttr, X As Integer)
|
||||
'
|
||||
' Dim iAttr As Integer
|
||||
'
|
||||
' Try iAttr = Attr[X]
|
||||
'
|
||||
' If BTst(iAttr, FLAG_BG) Then
|
||||
' hAttr.Background = Lsr(iAttr, 16) And 255
|
||||
' Else
|
||||
' hAttr.Background = Color.Default
|
||||
' Endif
|
||||
'
|
||||
' If BTst(iAttr, FLAG_FG) Then
|
||||
' hAttr.Foreground = Lsr(iAttr, 24) And 255
|
||||
' Else
|
||||
' hAttr.Foreground = Color.Default
|
||||
' Endif
|
||||
'
|
||||
' hAttr.Bold = BTst(iAttr, FLAG_BOLD)
|
||||
' hAttr.Dim = BTst(iAttr, FLAG_DIM)
|
||||
' hAttr.Reverse = BTst(iAttr, FLAG_REV)
|
||||
' hAttr.Underscore = BTst(iAttr, FLAG_UND)
|
||||
' hAttr.Blink = BTst(iAttr, FLAG_BLK)
|
||||
'
|
||||
' End
|
||||
'
|
||||
Public Sub SetAttr(hAttr As TerminalAttr, X As Integer, L As Integer, bInsert As Boolean)
|
||||
|
||||
Dim iAttr As Long
|
||||
@ -214,4 +191,4 @@ End
|
||||
' Print
|
||||
'
|
||||
' End
|
||||
|
||||
'
|
||||
|
@ -159,7 +159,8 @@ Public Sub Clear()
|
||||
|
||||
End
|
||||
|
||||
Fast Private Sub Relayout(W As Integer)
|
||||
'Fast
|
||||
Private Sub Relayout(W As Integer)
|
||||
|
||||
Dim aAttr As Long[]
|
||||
Dim aLines As String[]
|
||||
@ -186,6 +187,8 @@ Fast Private Sub Relayout(W As Integer)
|
||||
For I = D To Lines.Max
|
||||
If I = $Y Then SY = aLines.Count
|
||||
hLine = Lines[I]
|
||||
' Print I; " = ";
|
||||
' hLine._Dump()
|
||||
If hLine Then
|
||||
sText &= hLine.Text
|
||||
aAttr.Insert(hLine.GetFullAttr())
|
||||
@ -251,6 +254,8 @@ Fast Private Sub Relayout(W As Integer)
|
||||
|
||||
For I = D To Lines.Max
|
||||
Lines[I].InitAttr(aAttr)
|
||||
' Print I; " => ";
|
||||
' Lines[I]._Dump()
|
||||
Next
|
||||
|
||||
'Debug "#3 "; Timer - fTimer
|
||||
|
@ -31,7 +31,7 @@ Public Sub Form_Open()
|
||||
Application.Animations = True
|
||||
TerminalView1.Exec(["bash"], ["PWD=/home/benoit/gambas/git/master/comp/src/gb.form.terminal"])
|
||||
TerminalView1.SetFocus
|
||||
TerminalView1.Input("cat .src/TerminalView/TerminalView.class | grep Test\n")
|
||||
TerminalView1.Input("cat .src/TerminalView/TerminalView.class | grep Then\n")
|
||||
|
||||
End
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user