mirror of https://github.com/Hilbis/Hilbish
fix: revert "fix: resize if terminal has been resized during running command and fix readline segfault"
This reverts commit d270e8f66b
.
causes breakage
dev
parent
d270e8f66b
commit
4e2e8ddf94
17
main.go
17
main.go
|
@ -34,9 +34,6 @@ var (
|
|||
hooks bait.Bait
|
||||
defaultConfPath string
|
||||
defaultHistPath string
|
||||
|
||||
resized bool
|
||||
started bool
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -170,7 +167,6 @@ func main() {
|
|||
os.Exit(0)
|
||||
}
|
||||
|
||||
started = true
|
||||
input:
|
||||
for interactive {
|
||||
running = false
|
||||
|
@ -178,11 +174,6 @@ input:
|
|||
lr.SetPrompt(fmtPrompt())
|
||||
input, err := lr.Read()
|
||||
|
||||
if resized {
|
||||
resized = false
|
||||
lr.Resize()
|
||||
}
|
||||
|
||||
if err == io.EOF {
|
||||
// Exit if user presses ^D (ctrl + d)
|
||||
break
|
||||
|
@ -279,12 +270,8 @@ func HandleSignals() {
|
|||
}
|
||||
case syscall.SIGWINCH:
|
||||
hooks.Em.Emit("signals.resize")
|
||||
if interactive {
|
||||
if !running && started {
|
||||
lr.Resize()
|
||||
} else {
|
||||
resized = true
|
||||
}
|
||||
if !running && interactive {
|
||||
lr.Resize()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue