Skip to content

Commit 40a7871

Browse files
committed
Removes watching function
1 parent 327d394 commit 40a7871

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

internal/terminal/terminal.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ package terminal
33
import (
44
"fmt"
55
"os"
6-
"os/signal"
76
"strings"
8-
"syscall"
97

108
"github.com/mattn/go-isatty"
119
"golang.org/x/term"
@@ -49,8 +47,6 @@ func init() {
4947
}
5048

5149
width = c
52-
53-
watchTerminalResize()
5450
}
5551

5652
func CleanUp() {
@@ -127,20 +123,6 @@ func DashedLine() {
127123
Print(SecondaryColor, false, strings.Repeat(ellipsis, width-col))
128124
}
129125

130-
func watchTerminalResize() {
131-
sigwinch := make(chan os.Signal, 1)
132-
signal.Notify(sigwinch, syscall.SIGWINCH)
133-
134-
go func() {
135-
for range sigwinch {
136-
newWidth, _, err := term.GetSize(int(os.Stdout.Fd()))
137-
if err == nil {
138-
width = newWidth
139-
}
140-
}
141-
}()
142-
}
143-
144126
func GetCursorPosition() (int, int, error) {
145127
if !IsInteractive() {
146128
return 0, 0, fmt.Errorf("not an interactive terminal")

0 commit comments

Comments
 (0)