Allow setting :opt:active_border_color to `none` to not draw a border around the active window

Fixes #805
Fixes #1491
This commit is contained in:
Kovid Goyal
2019-03-24 10:04:32 +05:30
parent cb095be0cc
commit fcedc9f5c3
7 changed files with 31 additions and 10 deletions

View File

@@ -52,6 +52,7 @@ class Borders:
self.tab_id = tab_id
self.border_width = border_width
self.padding_width = padding_width
self.draw_active_borders = opts.active_border_color is not None
def __call__(
self,
@@ -77,7 +78,7 @@ class Borders:
window_bg = (window_bg << 8) | BorderColor.window_bg
if draw_borders:
# Draw the border rectangles
if w is active_window:
if w is active_window and self.draw_active_borders:
color = BorderColor.active
else:
color = BorderColor.bell if w.needs_attention else BorderColor.inactive