diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2017-01-11 22:13:40 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2017-01-11 22:13:40 +0900 |
| commit | 9977a3e9fcdc2d2feda2f8cd2990a89c21804e56 (patch) | |
| tree | 9a4657c2bb6733dfd3304f7531aa51cae66c4b6f /src/tui/tcell.go | |
| parent | f8082bc53a5bc736558d5952a34b527f12815878 (diff) | |
| download | fzf-9977a3e9fcdc2d2feda2f8cd2990a89c21804e56.tar.gz | |
Make preview renderer suspend early on line wrap
Diffstat (limited to 'src/tui/tcell.go')
| -rw-r--r-- | src/tui/tcell.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tui/tcell.go b/src/tui/tcell.go index b6f08192..3399d32b 100644 --- a/src/tui/tcell.go +++ b/src/tui/tcell.go @@ -477,7 +477,7 @@ func (w *TcellWindow) CPrint(pair ColorPair, attr Attr, text string) { w.printString(text, pair, attr) } -func (w *TcellWindow) fillString(text string, pair ColorPair, a Attr) bool { +func (w *TcellWindow) fillString(text string, pair ColorPair, a Attr) FillReturn { lx := 0 var style tcell.Style @@ -511,7 +511,7 @@ func (w *TcellWindow) fillString(text string, pair ColorPair, a Attr) bool { var yPos = w.top + w.lastY if yPos >= (w.top + w.height) { - return false + return FillSuspend } _screen.SetContent(xPos, yPos, r, nil, style) @@ -520,14 +520,14 @@ func (w *TcellWindow) fillString(text string, pair ColorPair, a Attr) bool { } w.lastX += lx - return true + return FillContinue } -func (w *TcellWindow) Fill(str string) bool { +func (w *TcellWindow) Fill(str string) FillReturn { return w.fillString(str, ColDefault, 0) } -func (w *TcellWindow) CFill(fg Color, bg Color, a Attr, str string) bool { +func (w *TcellWindow) CFill(fg Color, bg Color, a Attr, str string) FillReturn { return w.fillString(str, ColorPair{fg, bg, -1}, a) } |
