Skip to content
Myr

Setup signal handlers before ncurses initialization

Before adoption: this commit came in with the history the project adopted, so no landing records it.

This prevents fzf from missing SIGWINCH during startup which occasionally happens with fzf-tmux

authored by Junegunn Choi · committed by Junegunn Choi · parent 81a8869 · Browse files · 2 files+16 added−15 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+16 added−15 removed

  • other:+16 added−15 removed

2 files+16 added−15 removed

modified:src/terminal.go+15 added-15 removed
711 unmodified lines
712// Loop is called to start Terminal I/O713func (t *Terminal) Loop() {714 <-t.startChan715 { // Late initialization716 t.mutex.Lock()717 t.initFunc()718 t.calculateMargins()719 t.printPrompt()720 t.placeCursor()721 C.Refresh()722 t.printInfo()723 t.printHeader()724 t.mutex.Unlock()725 go func() {726 timer := time.NewTimer(initialDelay)727 <-timer.C728 t.reqBox.Set(reqRefresh, nil)729 }()730716 intChan := make(chan os.Signal, 1)717 signal.Notify(intChan, os.Interrupt, os.Kill)718 go func() {719 <-intChan
8 unmodified lines
728 t.reqBox.Set(reqRedraw, nil)729 }730 }()731732 t.mutex.Lock()733 t.initFunc()734 t.calculateMargins()735 t.printPrompt()736 t.placeCursor()737 C.Refresh()738 t.printInfo()739 t.printHeader()740 t.mutex.Unlock()741 go func() {742 timer := time.NewTimer(initialDelay)743 <-timer.C744 t.reqBox.Set(reqRefresh, nil)745 }()746747 // Keep the spinner spinning748 go func() {749 for {750 t.mutex.Lock()
384 unmodified lines
modified:CHANGELOG.md+1 added
7 unmodified lines
8 - `--extended-exact` is deprecated and instead we have `--exact` for9 orthogonally controlling "exactness" of search10- Fixed not to display non-printable characters11- Added `double-click` for `--bind` option12- More robust handling of SIGWINCH13140.10.815------16
312 unmodified lines