mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2025-01-28 17:48:25 +00:00
Compare commits
2 Commits
5ae60e2e80
...
6444cc7905
Author | SHA1 | Date | |
---|---|---|---|
|
6444cc7905 | ||
|
328af1f397 |
@ -2014,7 +2014,9 @@ func (t *Terminal) resizeWindows(forcePreview bool, redrawBorder bool) {
|
|||||||
// Print border label
|
// Print border label
|
||||||
t.printLabel(t.wborder, t.listLabel, t.listLabelOpts, t.listLabelLen, t.listBorderShape, false)
|
t.printLabel(t.wborder, t.listLabel, t.listLabelOpts, t.listLabelLen, t.listBorderShape, false)
|
||||||
t.printLabel(t.border, t.borderLabel, t.borderLabelOpts, t.borderLabelLen, t.borderShape, false)
|
t.printLabel(t.border, t.borderLabel, t.borderLabelOpts, t.borderLabelLen, t.borderShape, false)
|
||||||
t.printLabel(t.pborder, t.previewLabel, t.previewLabelOpts, t.previewLabelLen, t.activePreviewOpts.border, false)
|
if t.pborder != nil && t.pwindow.Height() != t.pborder.Height() { // To address --preview-border=line with different positions
|
||||||
|
t.printLabel(t.pborder, t.previewLabel, t.previewLabelOpts, t.previewLabelLen, t.activePreviewOpts.border, false)
|
||||||
|
}
|
||||||
t.printLabel(t.inputBorder, t.inputLabel, t.inputLabelOpts, t.inputLabelLen, t.inputBorderShape, false)
|
t.printLabel(t.inputBorder, t.inputLabel, t.inputLabelOpts, t.inputLabelLen, t.inputBorderShape, false)
|
||||||
t.printLabel(t.headerBorder, t.headerLabel, t.headerLabelOpts, t.headerLabelLen, t.headerBorderShape, false)
|
t.printLabel(t.headerBorder, t.headerLabel, t.headerLabelOpts, t.headerLabelLen, t.headerBorderShape, false)
|
||||||
}
|
}
|
||||||
@ -2029,7 +2031,7 @@ func (t *Terminal) printLabel(window tui.Window, render labelPrinter, opts label
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch borderShape {
|
switch borderShape {
|
||||||
case tui.BorderHorizontal, tui.BorderTop, tui.BorderBottom, tui.BorderRounded, tui.BorderSharp, tui.BorderBold, tui.BorderBlock, tui.BorderThinBlock, tui.BorderDouble:
|
case tui.BorderHorizontal, tui.BorderTop, tui.BorderBottom, tui.BorderRounded, tui.BorderSharp, tui.BorderBold, tui.BorderBlock, tui.BorderThinBlock, tui.BorderDouble, tui.BorderLine:
|
||||||
if redrawBorder {
|
if redrawBorder {
|
||||||
window.DrawHBorder()
|
window.DrawHBorder()
|
||||||
}
|
}
|
||||||
@ -2386,7 +2388,11 @@ func (t *Terminal) printHeaderImpl() {
|
|||||||
}
|
}
|
||||||
// Wrapping is not supported for header
|
// Wrapping is not supported for header
|
||||||
wrap := t.wrap
|
wrap := t.wrap
|
||||||
indent := strings.Repeat(" ", t.pointerLen+t.markerLen)
|
indentSize := t.pointerLen + t.markerLen
|
||||||
|
if t.headerBorderShape.HasLeft() && !t.listBorderShape.HasLeft() {
|
||||||
|
indentSize = util.Max(0, indentSize-(1+t.borderWidth))
|
||||||
|
}
|
||||||
|
indent := strings.Repeat(" ", indentSize)
|
||||||
t.wrap = false
|
t.wrap = false
|
||||||
for idx, lineStr := range append(append([]string{}, t.header0...), t.header...) {
|
for idx, lineStr := range append(append([]string{}, t.header0...), t.header...) {
|
||||||
line := idx
|
line := idx
|
||||||
|
@ -3588,9 +3588,9 @@ class TestGoFZF < TestBase
|
|||||||
│ 11
|
│ 11
|
||||||
│ > 10
|
│ > 10
|
||||||
│ ┌────────
|
│ ┌────────
|
||||||
│ │ 3
|
│ │ 3
|
||||||
│ │ 2
|
│ │ 2
|
||||||
│ │ 1
|
│ │ 1
|
||||||
│ └header──
|
│ └header──
|
||||||
│ 19/97 ─
|
│ 19/97 ─
|
||||||
│ > 1
|
│ > 1
|
||||||
@ -3609,9 +3609,9 @@ class TestGoFZF < TestBase
|
|||||||
│ 19/97 ─
|
│ 19/97 ─
|
||||||
│ > 1
|
│ > 1
|
||||||
│ ┌────────
|
│ ┌────────
|
||||||
│ │ 3
|
│ │ 3
|
||||||
│ │ 2
|
│ │ 2
|
||||||
│ │ 1
|
│ │ 1
|
||||||
│ └header──
|
│ └header──
|
||||||
│
|
│
|
||||||
╰────────────
|
╰────────────
|
||||||
|
Loading…
x
Reference in New Issue
Block a user