File tree Expand file tree Collapse file tree 1 file changed +0
-18
lines changed
Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,7 @@ package terminal
33import (
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
5652func 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-
144126func GetCursorPosition () (int , int , error ) {
145127 if ! IsInteractive () {
146128 return 0 , 0 , fmt .Errorf ("not an interactive terminal" )
You can’t perform that action at this time.
0 commit comments