diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2023-01-06 15:36:12 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2023-01-06 15:36:12 +0900 |
commit | 3b2244077d3e7d299943077b33e0564ffcd1f384 (patch) | |
tree | 7baafc13c662d489b1019c57d4059f08a028c4f4 /src/tui | |
parent | ee5cdb9713715883ac6d2cd87bc8a091ff7c8361 (diff) |
Add scrollbar to the preview window
Diffstat (limited to 'src/tui')
-rw-r--r-- | src/tui/tui.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tui/tui.go b/src/tui/tui.go index 063c4e6f..c6a65d82 100644 --- a/src/tui/tui.go +++ b/src/tui/tui.go @@ -307,6 +307,22 @@ const ( BorderRight ) +func (s BorderShape) HasRight() bool { + switch s { + case BorderNone, BorderLeft, BorderTop, BorderBottom, BorderHorizontal: // No right + return false + } + return true +} + +func (s BorderShape) HasTop() bool { + switch s { + case BorderNone, BorderLeft, BorderRight, BorderBottom, BorderVertical: // No top + return false + } + return true +} + type BorderStyle struct { shape BorderShape horizontal rune |