Add preview-half-page-down and preview-half-page-up (#2145)

This commit is contained in:
Tinmarino
2020-10-05 09:58:56 -03:00
committed by GitHub
parent 825d401403
commit c0aa5a438f
4 changed files with 19 additions and 0 deletions

View File

@@ -236,6 +236,8 @@ const (
actPreviewDown
actPreviewPageUp
actPreviewPageDown
actPreviewHalfPageUp
actPreviewHalfPageDown
actPreviousHistory
actNextHistory
actExecute
@@ -1953,6 +1955,14 @@ func (t *Terminal) Loop() {
if t.hasPreviewWindow() {
scrollPreview(t.pwindow.Height())
}
case actPreviewHalfPageUp:
if t.hasPreviewWindow() {
scrollPreview(-t.pwindow.Height()/2)
}
case actPreviewHalfPageDown:
if t.hasPreviewWindow() {
scrollPreview(t.pwindow.Height()/2)
}
case actBeginningOfLine:
t.cx = 0
case actBackwardChar: