aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2014-09-09 18:18:42 +0200
committerMarc André Tanner <mat@brain-dump.org>2014-09-09 18:18:42 +0200
commit9e2755fefda4383913375521a717defc6cedd241 (patch)
tree7d7b3877a796d5df5fe116a84304d02bd7316452 /vis.c
parentb50365f7f662c97cff944e97a99378874efc8f6d (diff)
downloadvis-9e2755fefda4383913375521a717defc6cedd241.tar.gz
vis-9e2755fefda4383913375521a717defc6cedd241.tar.xz
Add window borders in vertical layout
Diffstat (limited to 'vis.c')
-rw-r--r--vis.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/vis.c b/vis.c
index f4679a2..9d7c3a9 100644
--- a/vis.c
+++ b/vis.c
@@ -67,11 +67,13 @@ static void vis_windows_arrange_vertical(Vis *vis) {
int n = 0, x = 0, y = 0;
for (VisWin *win = vis->windows; win; win = win->next)
n++;
- int width = vis->width / n;
+ int width = vis->width / n - 1;
for (VisWin *win = vis->windows; win; win = win->next) {
vis_window_resize(win, win->next ? width : vis->width - x, vis->height);
vis_window_move(win, x, y);
x += width;
+ if (win->next)
+ mvvline(0, x++, ACS_VLINE, vis->height);
}
}
@@ -204,13 +206,13 @@ static void vis_window_draw(VisWin *win) {
void vis_draw(Vis *vis) {
erase();
- wnoutrefresh(stdscr);
vis->windows_arrange(vis);
for (VisWin *win = vis->windows; win; win = win->next) {
if (vis->win != win)
vis_window_draw(win);
}
vis_window_draw(vis->win);
+ wnoutrefresh(stdscr);
}
void vis_update(Vis *vis) {