Fix select-history-next.

This commit is contained in:
Qi Xiao 2016-02-13 16:45:16 +01:00
parent 2be8cef135
commit 011f4dcaa2

View File

@ -35,7 +35,7 @@ func (ed *Editor) prevHistory() bool {
func (ed *Editor) nextHistory() bool {
if ed.store != nil {
// Persistent history
i, line, err := ed.store.FirstCmd(ed.history.current, ed.history.prefix, true)
i, line, err := ed.store.FirstCmd(ed.history.current+1, ed.history.prefix, true)
if err == nil {
ed.history.jump(i, line)
return true