2
2
镜像来自 https://github.com/Hilbis/Hilbish synced 2025-07-03 17:52:02 +00:00

fix: infinite loop when navigating history without any history

Fixes https://github.com/Rosettea/Hilbish/issues/252
This commit is contained in:
Super 2023-11-01 05:57:21 -04:00 committed by GitHub
父節點 78eb657897
當前提交 385c46025b
沒有發現已知的金鑰在資料庫的簽署中
GPG Key ID: 4AEE18F83AFDEB23

查看文件

@ -156,8 +156,8 @@ func (rl *Instance) walkHistory(i int) {
rl.updateHelpers() rl.updateHelpers()
// In order to avoid having to type j/k twice each time for history navigation, // 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. // 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 dedup && old == new { if new != "" && dedup && old == new {
rl.walkHistory(i) rl.walkHistory(i)
} }
} }