m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 08:13:40 -05:00

Make preview renderer suspend early on line wrap

This commit is contained in:
Junegunn Choi
2017-01-11 22:13:40 +09:00
parent f8082bc53a
commit 9977a3e9fc
5 changed files with 73 additions and 46 deletions

View File

@@ -282,11 +282,14 @@ func (r *FullscreenRenderer) DoesAutoWrap() bool {
return true
}
func (w *CursesWindow) Fill(str string) bool {
return C.waddstr(w.impl, C.CString(str)) == C.OK
func (w *CursesWindow) Fill(str string) FillReturn {
if C.waddstr(w.impl, C.CString(str)) == C.OK {
return FillContinue
}
return FillSuspend
}
func (w *CursesWindow) CFill(fg Color, bg Color, attr Attr, str string) bool {
func (w *CursesWindow) CFill(fg Color, bg Color, attr Attr, str string) FillReturn {
index := ColorPair{fg, bg, -1}.index()
C.wcolor_set(w.impl, C.short(index), nil)
C.wattron(w.impl, C.int(attr))