mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-28 10:53:49 -07:00
Fix regression in separator display
This commit is contained in:
@@ -1846,7 +1846,7 @@ func (t *Terminal) printInfo() {
|
|||||||
output = fmt.Sprintf("[Command failed: %s]", *t.failed)
|
output = fmt.Sprintf("[Command failed: %s]", *t.failed)
|
||||||
}
|
}
|
||||||
var outputPrinter labelPrinter
|
var outputPrinter labelPrinter
|
||||||
var outputLen int
|
outputLen := len(output)
|
||||||
if t.infoCommand != "" {
|
if t.infoCommand != "" {
|
||||||
output = t.executeCommand(t.infoCommand, false, true, true, true, output)
|
output = t.executeCommand(t.infoCommand, false, true, true, true, output)
|
||||||
outputPrinter, outputLen = t.ansiLabelPrinter(output, &tui.ColInfo, false)
|
outputPrinter, outputLen = t.ansiLabelPrinter(output, &tui.ColInfo, false)
|
||||||
@@ -1896,16 +1896,13 @@ func (t *Terminal) printInfo() {
|
|||||||
if outputPrinter == nil {
|
if outputPrinter == nil {
|
||||||
t.window.CPrint(tui.ColInfo, output)
|
t.window.CPrint(tui.ColInfo, output)
|
||||||
} else {
|
} else {
|
||||||
outputPrinter(t.window, maxWidth)
|
outputPrinter(t.window, maxWidth-1)
|
||||||
}
|
}
|
||||||
t.window.Print(" ") // Margin
|
t.window.Print(" ") // Margin
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if t.infoStyle == infoInlineRight {
|
if t.infoStyle == infoInlineRight {
|
||||||
if outputPrinter == nil {
|
|
||||||
outputLen = util.StringWidth(output)
|
|
||||||
}
|
|
||||||
if len(t.infoPrefix) == 0 {
|
if len(t.infoPrefix) == 0 {
|
||||||
move(line, pos, false)
|
move(line, pos, false)
|
||||||
newPos := util.Max(pos, t.window.Width()-outputLen-3)
|
newPos := util.Max(pos, t.window.Width()-outputLen-3)
|
||||||
|
Reference in New Issue
Block a user