mirror of
https://github.com/peco/peco.git
synced 2026-09-10 07:16:29 -04:00
Don't change line if there is no output
This commit is contained in:
parent
912e858a10
commit
c3eeb5c8af
|
|
@ -351,7 +351,7 @@ func (l *ListArea) Draw(parent Layout, perPage int, runningQuery bool) {
|
|||
|
||||
// This protects us from losing the selected line in case our selected
|
||||
// line is greater than the buffer
|
||||
if lbufsiz := linebuf.Size(); l.currentLine >= lbufsiz {
|
||||
if lbufsiz := linebuf.Size(); lbufsiz > 0 && l.currentLine >= lbufsiz {
|
||||
l.currentLine = lbufsiz - 1
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue