diff --git a/comp/src/gb.form.terminal/.src/TerminalView/CTerminalLine.class b/comp/src/gb.form.terminal/.src/TerminalView/CTerminalLine.class index 312cbab1a..ad200c2c3 100644 --- a/comp/src/gb.form.terminal/.src/TerminalView/CTerminalLine.class +++ b/comp/src/gb.form.terminal/.src/TerminalView/CTerminalLine.class @@ -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 - +' diff --git a/comp/src/gb.form.terminal/.src/TerminalView/TerminalScreen.class b/comp/src/gb.form.terminal/.src/TerminalView/TerminalScreen.class index 2d9161466..5187d120b 100644 --- a/comp/src/gb.form.terminal/.src/TerminalView/TerminalScreen.class +++ b/comp/src/gb.form.terminal/.src/TerminalView/TerminalScreen.class @@ -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 diff --git a/comp/src/gb.form.terminal/.src/TerminalView/test/FTestTerminalView.class b/comp/src/gb.form.terminal/.src/TerminalView/test/FTestTerminalView.class index 0364daf21..09e76306d 100644 --- a/comp/src/gb.form.terminal/.src/TerminalView/test/FTestTerminalView.class +++ b/comp/src/gb.form.terminal/.src/TerminalView/test/FTestTerminalView.class @@ -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