perf: move cursor to last when switch to history by arrow up or down #77

This commit is contained in:
Lykin 2023-11-21 18:27:09 +08:00
parent 30d6da85a1
commit 4ffbdbd39a
1 changed files with 1 additions and 1 deletions

View File

@ -203,7 +203,7 @@ const moveInputCursor = (step) => {
} else { } else {
// update cursor position only // update cursor position only
const currentLine = getCurrentInput() const currentLine = getCurrentInput()
inputCursor = Math.min(Math.max(0, inputCursor), currentLine.length) inputCursor = Math.max(0, currentLine.length)
updateCursor = true updateCursor = true
} }