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

This commit is contained in:
Junegunn Choi
2024-05-07 19:22:39 +09:00
parent 4bedd33c59
commit 0952b2dfd4
3 changed files with 7 additions and 7 deletions

View File

@@ -235,7 +235,7 @@ type Terminal struct {
printQuery bool
history *History
cycle bool
cursorLine bool
highlightLine bool
headerVisible bool
headerFirst bool
headerLines int
@@ -761,7 +761,7 @@ func NewTerminal(opts *Options, eventBox *util.EventBox, executor *util.Executor
executor: executor,
paused: opts.Phony,
cycle: opts.Cycle,
cursorLine: opts.CursorLine,
highlightLine: opts.CursorLine,
headerVisible: true,
headerFirst: opts.HeaderFirst,
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)
}
if current && t.cursorLine {
if current && t.highlightLine {
maxWidth := t.window.Width() - (t.pointerLen + t.markerLen + 1)
fillSpaces := maxWidth - newLine.width
newLine.width = maxWidth