mirror of https://github.com/Hilbis/Hilbish
fix: infinite loop when navigating history without any history
Fixes https://github.com/Rosettea/Hilbish/issues/252pull/268/head
parent
78eb657897
commit
385c46025b
|
@ -156,8 +156,8 @@ func (rl *Instance) walkHistory(i int) {
|
|||
rl.updateHelpers()
|
||||
|
||||
// In order to avoid having to type j/k twice each time for history navigation,
|
||||
// we walk once again. This only ever happens when we aren't out of bounds.
|
||||
if dedup && old == new {
|
||||
// we walk once again. This only ever happens when we aren't out of bounds and the last history item was not a empty string.
|
||||
if new != "" && dedup && old == new {
|
||||
rl.walkHistory(i)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue