Skip to content

Commit

Permalink
feat(preview, header): readable on small width terminals
Browse files Browse the repository at this point in the history
- Moved some of the more common action keys leftward in the header so
  they don't get cut off
- Show the preview window below the list when the terminal is less than
  60 columns.
- Add preview header lines so the title is still visible when scrolled
  • Loading branch information
benelan committed Apr 26, 2024
1 parent b7697a0 commit ca8bbf5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gh-fzf
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ fi
# the FZF_DEFAULT_OPTS environment variable so they can be overridden by users.
FZF_DEFAULT_OPTS='
--no-hscroll --no-exit-0 --header-lines=1
--preview-window="right:50%,wrap"
--preview-window="right,50%,wrap,~2,<60(down,40%,wrap)"
--delimiter=" "
--preview-label="(alt+P: toggle preview) (alt+H: toggle hints)"
--bind="alt-P:toggle-preview"
Expand Down Expand Up @@ -183,7 +183,7 @@ issue_cmd() {
{{- end -}}
'\'''

issue_header="Actions > (enter: edit) (alt-o: checkout) (alt-c: comment) (alt-X: close) (alt-O: reopen) (alt-l: add label) (alt-L: remove label)
issue_header="Actions > (enter: edit) (alt-c: comment) (alt-o: checkout) (alt-l: add label) (alt-L: remove label) (alt-X: close) (alt-O: reopen)
Filters > (alt-a: assignee) (alt-A: author) (alt-m: mention) (alt-s: state=all)
$global_binds
Expand Down Expand Up @@ -261,7 +261,7 @@ pr_cmd() {
'\'''

pr_header="Actions > (enter: edit) (alt-o: checkout) (alt-d: diff) (alt-c: comment) (alt-r: review) (alt-l: add label)
> (alt-C: checks) (alt-M: merge) (alt-X: close) (alt-O: reopen) (alt-R: ready) (alt-L: remove label)
> (alt-C: checks) (alt-M: merge) (alt-R: ready) (alt-X: close) (alt-O: reopen) (alt-L: remove label)
Filters > (alt-a: assignee) (alt-A: author) (alt-b: branch) (alt-s: state=all)
$global_binds
Expand Down

0 comments on commit ca8bbf5

Please sign in to comment.