diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2024-06-23 18:23:46 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2024-06-23 18:23:46 +0900 |
| commit | a70ea4654ebb5581d6548bc4bd0ae3fcc88646d6 (patch) | |
| tree | 3eb74b98feb97131d4c13b6525bdba390e5e7110 /src | |
| parent | b02bf9b6bbf9adf2017d3c1342bde34ea9813ab5 (diff) | |
| download | fzf-a70ea4654ebb5581d6548bc4bd0ae3fcc88646d6.tar.gz | |
Fix regression in separator display
Diffstat (limited to 'src')
| -rw-r--r-- | src/terminal.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/terminal.go b/src/terminal.go index a70329c0..337f5700 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -1846,7 +1846,7 @@ func (t *Terminal) printInfo() { output = fmt.Sprintf("[Command failed: %s]", *t.failed) } var outputPrinter labelPrinter - var outputLen int + outputLen := len(output) if t.infoCommand != "" { output = t.executeCommand(t.infoCommand, false, true, true, true, output) outputPrinter, outputLen = t.ansiLabelPrinter(output, &tui.ColInfo, false) @@ -1896,16 +1896,13 @@ func (t *Terminal) printInfo() { if outputPrinter == nil { t.window.CPrint(tui.ColInfo, output) } else { - outputPrinter(t.window, maxWidth) + outputPrinter(t.window, maxWidth-1) } t.window.Print(" ") // Margin return } if t.infoStyle == infoInlineRight { - if outputPrinter == nil { - outputLen = util.StringWidth(output) - } if len(t.infoPrefix) == 0 { move(line, pos, false) newPos := util.Max(pos, t.window.Width()-outputLen-3) |
