Skip to content

Commit 9c28f90

Browse files
committed
fix: some bugs in changing terminal size
1 parent a9c7f4e commit 9c28f90

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

engine/logging/logger.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111
"sync"
1212
"syscall"
1313

14-
"github.com/alecthomas/bit/engine/internal/eventsource"
1514
"github.com/alecthomas/bit/engine/logging/csi"
15+
"github.com/alecthomas/types/eventsource"
1616
"github.com/creack/pty"
1717
"github.com/kballard/go-shellquote"
1818
"github.com/mattn/go-isatty"
@@ -111,7 +111,7 @@ func (l *Logger) Scope(scope string) *Logger {
111111
scope += strings.Repeat(" ", margin-len(scope))
112112
}
113113
scope = strings.ReplaceAll(scope, "%", "%%")
114-
return &Logger{scope: scope, level: l.level}
114+
return &Logger{scope: scope, level: l.level, size: l.size}
115115
}
116116

117117
var ansiTable = func() map[LogLevel]string {

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ require (
1616
golang.design/x/reflect v0.0.0-20220504060917-02c43be63f3b
1717
)
1818

19+
require github.com/alecthomas/types v0.10.1
20+
1921
require (
2022
github.com/hexops/gotextdiff v1.0.3 // indirect
2123
golang.org/x/sys v0.16.0 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
github.com/alecthomas/assert/v2 v2.4.0 h1:/ZiZ0NnriAWPYYO+4eOjgzNELrFQLaHNr92mHSHFj9U=
2-
github.com/alecthomas/assert/v2 v2.4.0/go.mod h1:fw5suVxB+wfYJ3291t0hRTqtGzFYdSwstnRQdaQx2DM=
31
github.com/alecthomas/assert/v2 v2.5.0 h1:OJKYg53BQx06/bMRBSPDCO49CbCDNiUQXwdoNrt6x5w=
42
github.com/alecthomas/assert/v2 v2.5.0/go.mod h1:fw5suVxB+wfYJ3291t0hRTqtGzFYdSwstnRQdaQx2DM=
53
github.com/alecthomas/atomic v0.1.0-alpha2 h1:dqwXmax66gXvHhsOS4pGPZKqYOlTkapELkLb3MNdlH8=
@@ -10,6 +8,8 @@ github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6i
108
github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c=
119
github.com/alecthomas/repr v0.3.0 h1:NeYzUPfjjlqHY4KtzgKJiWd6sVq2eNUPTi34PiFGjY8=
1210
github.com/alecthomas/repr v0.3.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
11+
github.com/alecthomas/types v0.10.1 h1:PuBMoHpFL2jaW3VgPDRhCk1oKoBCzfbsL5sAxEc3U3A=
12+
github.com/alecthomas/types v0.10.1/go.mod h1:fIOGnLeeUJXe1AAVofQmMaEMWLxY9bK4QxTLGIo30PA=
1313
github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I=
1414
github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
1515
github.com/creack/pty v1.1.21 h1:1/QdRyBaHHJP61QkWMXlOIBfsgdDeeKfK8SYVUWJKf0=

0 commit comments

Comments
 (0)