Rename --cursor-line to --highlight-line

pull/3781/head
Junegunn Choi 4 weeks ago
parent 4bedd33c59
commit 0952b2dfd4
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

@ -534,7 +534,7 @@ color mappings.
--color='pointer:#E12672,marker:#E17899,prompt:#98BEDE,hl+:#98BC99'\fR --color='pointer:#E12672,marker:#E17899,prompt:#98BEDE,hl+:#98BC99'\fR
.RE .RE
.TP .TP
.B "--cursor-line" .B "--highlight-line"
Highlight the whole current line Highlight the whole current line
.TP .TP
.B "--no-bold" .B "--no-bold"

@ -92,7 +92,7 @@ const Usage = `usage: fzf [options]
--ansi Enable processing of ANSI color codes --ansi Enable processing of ANSI color codes
--tabstop=SPACES Number of spaces for a tab character (default: 8) --tabstop=SPACES Number of spaces for a tab character (default: 8)
--color=COLSPEC Base scheme (dark|light|16|bw) and/or custom colors --color=COLSPEC Base scheme (dark|light|16|bw) and/or custom colors
--cursor-line Highlight the whole current line --highlight-line Highlight the whole current line
--no-bold Do not use bold text --no-bold Do not use bold text
History History
@ -1950,9 +1950,9 @@ func parseOptions(opts *Options, allArgs []string) error {
opts.Layout = layoutDefault opts.Layout = layoutDefault
case "--cycle": case "--cycle":
opts.Cycle = true opts.Cycle = true
case "--cursor-line": case "--highlight-line":
opts.CursorLine = true opts.CursorLine = true
case "--no-cursor-line": case "--no-highlight-line":
opts.CursorLine = false opts.CursorLine = false
case "--no-cycle": case "--no-cycle":
opts.Cycle = false opts.Cycle = false

@ -235,7 +235,7 @@ type Terminal struct {
printQuery bool printQuery bool
history *History history *History
cycle bool cycle bool
cursorLine bool highlightLine bool
headerVisible bool headerVisible bool
headerFirst bool headerFirst bool
headerLines int headerLines int
@ -761,7 +761,7 @@ func NewTerminal(opts *Options, eventBox *util.EventBox, executor *util.Executor
executor: executor, executor: executor,
paused: opts.Phony, paused: opts.Phony,
cycle: opts.Cycle, cycle: opts.Cycle,
cursorLine: opts.CursorLine, highlightLine: opts.CursorLine,
headerVisible: true, headerVisible: true,
headerFirst: opts.HeaderFirst, headerFirst: opts.HeaderFirst,
headerLines: opts.HeaderLines, headerLines: opts.HeaderLines,
@ -1920,7 +1920,7 @@ func (t *Terminal) printItem(result Result, line int, i int, current bool, bar b
} }
newLine.width = t.printHighlighted(result, tui.ColNormal, tui.ColMatch, false, true) newLine.width = t.printHighlighted(result, tui.ColNormal, tui.ColMatch, false, true)
} }
if current && t.cursorLine { if current && t.highlightLine {
maxWidth := t.window.Width() - (t.pointerLen + t.markerLen + 1) maxWidth := t.window.Width() - (t.pointerLen + t.markerLen + 1)
fillSpaces := maxWidth - newLine.width fillSpaces := maxWidth - newLine.width
newLine.width = maxWidth newLine.width = maxWidth

Loading…
Cancel
Save