2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-04-01 11:13:24 +00:00

fix: move cursor to end of line on history search (closes #121)

This commit is contained in:
TorchedSammy 2022-03-21 06:47:14 -04:00
parent 754a63c74b
commit f27d60f827
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD

View File

@ -626,6 +626,8 @@ func (rl *Instance) escapeSeq(r []rune) {
}
rl.mainHist = true
rl.walkHistory(1)
moveCursorForwards(len(rl.line) - rl.pos)
rl.pos = len(rl.line)
case seqDown:
if rl.modeTabCompletion {
@ -637,6 +639,8 @@ func (rl *Instance) escapeSeq(r []rune) {
}
rl.mainHist = true
rl.walkHistory(-1)
moveCursorForwards(len(rl.line) - rl.pos)
rl.pos = len(rl.line)
case seqForwards:
if rl.modeTabCompletion {