feat: add borderstyle option (#2445)
This commit is contained in:
1 parent
d85070f69d
commit
f1a1097db5
11 files changed
+184
-84
No files matched your search
@@ -530,12 +530,12 @@ func readLines(reader io.ByteReader, maxLines int) (lines []string, binary bool,
|
||||
|
||||
// getWidths calculates the widths of windows as the result of applying the
|
||||
// `ratios` option to the screen width. One column is allocated for each divider
|
||||
// between windows. The `drawbox` option requires an additional two columns to
|
||||
// draw the left and right borders.
|
||||
func getWidths(wtot int, ratios []int, drawbox bool) []int {
|
||||
// between windows. When `drawbox` is enabled and `borderstyle` includes an outline,
|
||||
// getWidths reserves two additional columns for the left and right borders.
|
||||
func getWidths(wtot int, ratios []int, drawbox bool, borderstyle borderStyle) []int {
|
||||
rlen := len(ratios)
|
||||
wtot -= rlen - 1
|
||||
if drawbox {
|
||||
if drawbox && borderstyle&borderOutline != 0 {
|
||||
wtot -= 2
|
||||
}
|
||||
wtot = max(wtot, 0)
|
||||
|
||||
Reference in new issue
Block a user