From 289997e37330c8429fa0d2d3f7b0a3e0ddf970f2 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 8 Dec 2024 21:09:27 +0900 Subject: Refactor --- src/tui/tui.go | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'src/tui/tui.go') diff --git a/src/tui/tui.go b/src/tui/tui.go index e7d3e42f..04d548f4 100644 --- a/src/tui/tui.go +++ b/src/tui/tui.go @@ -410,6 +410,18 @@ type BorderStyle struct { type BorderCharacter int func MakeBorderStyle(shape BorderShape, unicode bool) BorderStyle { + if shape == BorderNone { + return BorderStyle{ + shape: BorderRounded, + top: ' ', + bottom: ' ', + left: ' ', + right: ' ', + topLeft: ' ', + topRight: ' ', + bottomLeft: ' ', + bottomRight: ' '} + } if !unicode { return BorderStyle{ shape: shape, @@ -506,19 +518,6 @@ func MakeBorderStyle(shape BorderShape, unicode bool) BorderStyle { } } -func MakeTransparentBorder() BorderStyle { - return BorderStyle{ - shape: BorderRounded, - top: ' ', - bottom: ' ', - left: ' ', - right: ' ', - topLeft: ' ', - topRight: ' ', - bottomLeft: ' ', - bottomRight: ' '} -} - type TermSize struct { Lines int Columns int -- cgit v1.2.3