Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fzf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
fzf
Commits
c0aa5a43
Unverified
Commit
c0aa5a43
authored
4 years ago
by
Tinmarino
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add preview-half-page-down and preview-half-page-up (#2145)
parent
825d4014
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG.md
+3
-0
3 additions, 0 deletions
CHANGELOG.md
man/man1/fzf.1
+2
-0
2 additions, 0 deletions
man/man1/fzf.1
src/options.go
+4
-0
4 additions, 0 deletions
src/options.go
src/terminal.go
+10
-0
10 additions, 0 deletions
src/terminal.go
with
19 additions
and
0 deletions
CHANGELOG.md
+
3
−
0
View file @
c0aa5a43
...
...
@@ -13,6 +13,9 @@ CHANGELOG
-
Added
`--preview-window`
option for sharp edges (
`--preview-window sharp`
)
-
Reduced vertical padding around the preview window when
`--preview-window
noborder`
is used
-
Added actions for preview window
-
`preview-half-page-up`
-
`preview-half-page-down`
-
Vim
-
Popup width and height can be given in absolute integer values
-
Added
`fzf#exec()`
function for getting the path of fzf executable
...
...
This diff is collapsed.
Click to expand it.
man/man1/fzf.1
+
2
−
0
View file @
c0aa5a43
...
...
@@ -718,6 +718,8 @@ A key or an event can be bound to one or more of the following actions.
\fBpreview-up\fR \fIshift-up\fR
\fBpreview-page-down\fR
\fBpreview-page-up\fR
\fBpreview-half-page-down\fR
\fBpreview-half-page-up\fR
\fBprevious-history\fR (\fIctrl-p\fR on \fB--history\fR)
\fBprint-query\fR (print query and exit)
\fBrefresh-preview\fR
...
...
This diff is collapsed.
Click to expand it.
src/options.go
+
4
−
0
View file @
c0aa5a43
...
...
@@ -854,6 +854,10 @@ func parseKeymap(keymap map[int][]action, str string) {
appendAction
(
actPreviewPageUp
)
case
"preview-page-down"
:
appendAction
(
actPreviewPageDown
)
case
"preview-half-page-up"
:
appendAction
(
actPreviewHalfPageUp
)
case
"preview-half-page-down"
:
appendAction
(
actPreviewHalfPageDown
)
default
:
t
:=
isExecuteAction
(
specLower
)
if
t
==
actIgnore
{
...
...
This diff is collapsed.
Click to expand it.
src/terminal.go
+
10
−
0
View file @
c0aa5a43
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment