Colors for 'separator' and 'scrollbar' will default to that for 'border'
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Junegunn Choi · committed by Junegunn Choi · parent 5cd6f1d · Browse files · 4 files·+40 added−35 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+40 added−35 removed
- other:+40 added−35 removed
Provenance
- Commit
435d8fa- Tree
a355a4a- Author
Junegunn Choi <junegunn.c@gmail.com>- Committer
Junegunn Choi <junegunn.c@gmail.com>- Parent
5cd6f1d
4 files changed+40 added−35 removed
modified:man/man1/fzf.1+23 added-22 removed
356 unmodified lines357 \fB--separator=''\fB358 359 .TP360 .BI "--scrollbar=" "CHAR"361-Use the given character to render scrollbar. (default: '▏' or ':' depending on361+Use the given character to render scrollbar. (default: '│' or ':' depending on362 \fB--no-unicode\fR).363 364 .TP365 .B "--no-scrollbar"46 unmodified lines412 \fB16 \fRColor scheme for 16-color terminal413 \fBbw \fRNo colors (equivalent to \fB--no-color\fR)414 415 .B COLOR NAMES:416- \fBfg \fRText417- \fBbg \fRBackground418- \fBpreview-fg \fRPreview window text419- \fBpreview-bg \fRPreview window background420- \fBhl \fRHighlighted substrings421- \fBfg+ \fRText (current line)422- \fBbg+ \fRBackground (current line)423- \fBgutter \fRGutter on the left (defaults to \fBbg+\fR)424- \fBhl+ \fRHighlighted substrings (current line)425- \fBquery \fRQuery string426- \fBdisabled \fRQuery string when search is disabled427- \fBinfo \fRInfo line (match counters)428- \fBseparator \fRHorizontal separator on info line (match counters)429- \fBborder \fRBorder around the window (\fB--border\fR and \fB--preview\fR)430- \fBlabel \fRBorder label (\fB--border-label\fR and \fB--preview-label\fR)431- \fBpreview-label \fRBorder label of the preview window (\fB--preview-label\fR)432- \fBprompt \fRPrompt433- \fBpointer \fRPointer to the current line434- \fBmarker \fRMulti-select marker435- \fBspinner \fRStreaming input indicator436- \fBheader \fRHeader416+ \fBfg \fRText417+ \fBpreview-fg \fRPreview window text418+ \fBbg \fRBackground419+ \fBpreview-bg \fRPreview window background420+ \fBhl \fRHighlighted substrings421+ \fBfg+ \fRText (current line)422+ \fBbg+ \fRBackground (current line)423+ \fBgutter \fRGutter on the left424+ \fBhl+ \fRHighlighted substrings (current line)425+ \fBquery \fRQuery string426+ \fBdisabled \fRQuery string when search is disabled (\fB--disabled\fR)427+ \fBinfo \fRInfo line (match counters)428+ \fBborder \fRBorder around the window (\fB--border\fR and \fB--preview\fR)429+ \fBseparator \fRHorizontal separator on info line430+ \fBscrollbar \fRScrollbar431+ \fBlabel \fRBorder label (\fB--border-label\fR and \fB--preview-label\fR)432+ \fBpreview-label \fRBorder label of the preview window (\fB--preview-label\fR)433+ \fBprompt \fRPrompt434+ \fBpointer \fRPointer to the current line435+ \fBmarker \fRMulti-select marker436+ \fBspinner \fRStreaming input indicator437+ \fBheader \fRHeader438 439 .B ANSI COLORS:440 \fB-1 \fRDefault terminal foreground/background color441 \fB \fR(or the original color of the text)757 unmodified linesmodified:src/tui/tui.go+12 added-12 removed
489 unmodified lines490 Info: ColorAttr{colUndefined, AttrUndefined},491 Cursor: ColorAttr{colUndefined, AttrUndefined},492 Selected: ColorAttr{colUndefined, AttrUndefined},493 Header: ColorAttr{colUndefined, AttrUndefined},494- Separator: ColorAttr{colUndefined, AttrUndefined},495- Scrollbar: ColorAttr{colUndefined, AttrUndefined},494 Border: ColorAttr{colUndefined, AttrUndefined},495 BorderLabel: ColorAttr{colUndefined, AttrUndefined},496 Disabled: ColorAttr{colUndefined, AttrUndefined},497 PreviewFg: ColorAttr{colUndefined, AttrUndefined},498 PreviewBg: ColorAttr{colUndefined, AttrUndefined},499 Gutter: ColorAttr{colUndefined, AttrUndefined},500 PreviewLabel: ColorAttr{colUndefined, AttrUndefined},501+ Separator: ColorAttr{colUndefined, AttrUndefined},502+ Scrollbar: ColorAttr{colUndefined, AttrUndefined},503 }504 }505 506 func NoColorTheme() *ColorTheme {11 unmodified lines518 Info: ColorAttr{colDefault, AttrRegular},519 Cursor: ColorAttr{colDefault, AttrRegular},520 Selected: ColorAttr{colDefault, AttrRegular},521 Header: ColorAttr{colDefault, AttrRegular},522- Separator: ColorAttr{colDefault, AttrRegular},523- Scrollbar: ColorAttr{colDefault, AttrRegular},522 Border: ColorAttr{colDefault, AttrRegular},523 BorderLabel: ColorAttr{colDefault, AttrRegular},524 Disabled: ColorAttr{colDefault, AttrRegular},525 PreviewFg: ColorAttr{colDefault, AttrRegular},526 PreviewBg: ColorAttr{colDefault, AttrRegular},527 Gutter: ColorAttr{colDefault, AttrRegular},528 PreviewLabel: ColorAttr{colDefault, AttrRegular},529+ Separator: ColorAttr{colDefault, AttrRegular},530+ Scrollbar: ColorAttr{colDefault, AttrRegular},531 }532 }533 534 func errorExit(message string) {16 unmodified lines551 Info: ColorAttr{colWhite, AttrUndefined},552 Cursor: ColorAttr{colRed, AttrUndefined},553 Selected: ColorAttr{colMagenta, AttrUndefined},554 Header: ColorAttr{colCyan, AttrUndefined},555- Separator: ColorAttr{colBlack, AttrUndefined},556- Scrollbar: ColorAttr{colBlack, AttrUndefined},555 Border: ColorAttr{colBlack, AttrUndefined},556 BorderLabel: ColorAttr{colWhite, AttrUndefined},557 Disabled: ColorAttr{colUndefined, AttrUndefined},558 PreviewFg: ColorAttr{colUndefined, AttrUndefined},559 PreviewBg: ColorAttr{colUndefined, AttrUndefined},560 Gutter: ColorAttr{colUndefined, AttrUndefined},561 PreviewLabel: ColorAttr{colUndefined, AttrUndefined},562+ Separator: ColorAttr{colUndefined, AttrUndefined},563+ Scrollbar: ColorAttr{colUndefined, AttrUndefined},564 }565 Dark256 = &ColorTheme{566 Colored: true,567 Input: ColorAttr{colDefault, AttrUndefined},8 unmodified lines576 Info: ColorAttr{144, AttrUndefined},577 Cursor: ColorAttr{161, AttrUndefined},578 Selected: ColorAttr{168, AttrUndefined},579 Header: ColorAttr{109, AttrUndefined},580- Separator: ColorAttr{59, AttrUndefined},581- Scrollbar: ColorAttr{59, AttrUndefined},580 Border: ColorAttr{59, AttrUndefined},581 BorderLabel: ColorAttr{145, AttrUndefined},582 Disabled: ColorAttr{colUndefined, AttrUndefined},583 PreviewFg: ColorAttr{colUndefined, AttrUndefined},584 PreviewBg: ColorAttr{colUndefined, AttrUndefined},585 Gutter: ColorAttr{colUndefined, AttrUndefined},586 PreviewLabel: ColorAttr{colUndefined, AttrUndefined},587+ Separator: ColorAttr{colUndefined, AttrUndefined},588+ Scrollbar: ColorAttr{colUndefined, AttrUndefined},589 }590 Light256 = &ColorTheme{591 Colored: true,592 Input: ColorAttr{colDefault, AttrUndefined},8 unmodified lines601 Info: ColorAttr{101, AttrUndefined},602 Cursor: ColorAttr{161, AttrUndefined},603 Selected: ColorAttr{168, AttrUndefined},604 Header: ColorAttr{31, AttrUndefined},605- Separator: ColorAttr{145, AttrUndefined},606- Scrollbar: ColorAttr{145, AttrUndefined},605 Border: ColorAttr{145, AttrUndefined},606 BorderLabel: ColorAttr{59, AttrUndefined},607 Disabled: ColorAttr{colUndefined, AttrUndefined},608 PreviewFg: ColorAttr{colUndefined, AttrUndefined},609 PreviewBg: ColorAttr{colUndefined, AttrUndefined},610 Gutter: ColorAttr{colUndefined, AttrUndefined},611 PreviewLabel: ColorAttr{colUndefined, AttrUndefined},612+ Separator: ColorAttr{colUndefined, AttrUndefined},613+ Scrollbar: ColorAttr{colUndefined, AttrUndefined},614 }615 }616 617 func initTheme(theme *ColorTheme, baseTheme *ColorTheme, forceBlack bool) {23 unmodified lines641 theme.Info = o(baseTheme.Info, theme.Info)642 theme.Cursor = o(baseTheme.Cursor, theme.Cursor)643 theme.Selected = o(baseTheme.Selected, theme.Selected)644 theme.Header = o(baseTheme.Header, theme.Header)645- theme.Separator = o(baseTheme.Separator, theme.Separator)645 theme.Border = o(baseTheme.Border, theme.Border)646 theme.BorderLabel = o(baseTheme.BorderLabel, theme.BorderLabel)647 648 // These colors are not defined in the base themes1 unmodified line650 theme.Gutter = o(theme.DarkBg, theme.Gutter)651 theme.PreviewFg = o(theme.Fg, theme.PreviewFg)652 theme.PreviewBg = o(theme.Bg, theme.PreviewBg)653 theme.PreviewLabel = o(theme.BorderLabel, theme.PreviewLabel)654+ theme.Separator = o(theme.Border, theme.Separator)655- theme.Scrollbar = o(theme.Separator, theme.Scrollbar)655+ theme.Scrollbar = o(theme.Border, theme.Scrollbar)656 657 initPalette(theme)658 }659 35 unmodified linesmodified:src/terminal.go+1 added-1 removed
634 unmodified lines635 t.separator, t.separatorLen = t.ansiLabelPrinter(bar, &tui.ColSeparator, true)636 }637 if opts.Scrollbar == nil {638 if t.unicode {639- t.scrollbar = "▏" // Left one eighth block639+ t.scrollbar = "│"640 } else {641 t.scrollbar = "|"642 }643 } else {2666 unmodified linesmodified:CHANGELOG.md+4 added
103 unmodified lines104 ```sh105 # No need to bind 'double-click' to the same action106 fzf --bind 'enter:execute:less {}' # --bind 'double-click:execute:less {}'107 ```108+ - If the color for `separator` is not specified, it will default to the109+ color for `border`. Same holds true for `scrollbar`. This is to reduce110+ the number of configuration items required to achieve a consistent color111+ scheme.112 - Added color name `preview-label` for `--preview-label` (defaults to `label`113 for `--border-label`)114 - Minor bug fixes and improvements115 1389 unmodified lines