Compare commits

..

1 Commits

Author SHA1 Message Date
sammyette af14dc20a4
Merge eded38c7b5 into ff6e08902f 2024-05-04 13:22:16 -04:00
3 changed files with 3 additions and 7 deletions

View File

@ -128,19 +128,15 @@ func (rl *Instance) walkHistory(i int) {
}
rl.histOffset += i
historyLen := history.Len()
if rl.histOffset == 0 {
rl.line = []rune(rl.lineBuf)
rl.pos = len(rl.lineBuf)
} else if rl.histOffset <= -1 {
rl.histOffset = 0
} else if rl.histOffset > historyLen {
// TODO: should this wrap around?s
rl.histOffset = 0
} else {
dedup = true
old = string(rl.line)
new, err = history.GetLine(historyLen - rl.histOffset)
new, err = history.GetLine(history.Len() - rl.histOffset)
if err != nil {
rl.resetHelpers()
print("\r\n" + err.Error() + "\r\n")

View File

@ -29,7 +29,7 @@ func (rl *Instance) updateTabFind(r []rune) {
rl.search = string(rl.tfLine)
// We update and print
//rl.clearHelpers()
rl.clearHelpers()
rl.getTabCompletion()
rl.renderHelpers()
}

View File

@ -121,7 +121,7 @@ func (rl *Instance) clearHelpers() {
moveCursorForwards(rl.fullX)
// Clear everything below
print(seqClearScreenBelow)
//print(seqClearScreenBelow)
// Go back to current cursor position
moveCursorBackwards(GetTermWidth())