mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-25 22:27:41 +00:00
Setup signal handlers before ncurses initialization
This prevents fzf from missing SIGWINCH during startup which occasionally happens with fzf-tmux
This commit is contained in:
parent
81a88693c1
commit
6bddffbca4
@ -9,6 +9,7 @@ CHANGELOG
|
||||
orthogonally controlling "exactness" of search
|
||||
- Fixed not to display non-printable characters
|
||||
- Added `double-click` for `--bind` option
|
||||
- More robust handling of SIGWINCH
|
||||
|
||||
0.10.8
|
||||
------
|
||||
|
@ -713,21 +713,6 @@ func executeCommand(template string, current string) {
|
||||
func (t *Terminal) Loop() {
|
||||
<-t.startChan
|
||||
{ // Late initialization
|
||||
t.mutex.Lock()
|
||||
t.initFunc()
|
||||
t.calculateMargins()
|
||||
t.printPrompt()
|
||||
t.placeCursor()
|
||||
C.Refresh()
|
||||
t.printInfo()
|
||||
t.printHeader()
|
||||
t.mutex.Unlock()
|
||||
go func() {
|
||||
timer := time.NewTimer(initialDelay)
|
||||
<-timer.C
|
||||
t.reqBox.Set(reqRefresh, nil)
|
||||
}()
|
||||
|
||||
intChan := make(chan os.Signal, 1)
|
||||
signal.Notify(intChan, os.Interrupt, os.Kill)
|
||||
go func() {
|
||||
@ -744,6 +729,21 @@ func (t *Terminal) Loop() {
|
||||
}
|
||||
}()
|
||||
|
||||
t.mutex.Lock()
|
||||
t.initFunc()
|
||||
t.calculateMargins()
|
||||
t.printPrompt()
|
||||
t.placeCursor()
|
||||
C.Refresh()
|
||||
t.printInfo()
|
||||
t.printHeader()
|
||||
t.mutex.Unlock()
|
||||
go func() {
|
||||
timer := time.NewTimer(initialDelay)
|
||||
<-timer.C
|
||||
t.reqBox.Set(reqRefresh, nil)
|
||||
}()
|
||||
|
||||
// Keep the spinner spinning
|
||||
go func() {
|
||||
for {
|
||||
|
Loading…
Reference in New Issue
Block a user