summaryrefslogtreecommitdiffstats
path: root/layout.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-12-03 22:50:09 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-12-03 22:50:09 +0000
commit15a64b805e46584d37cc6745383709632e287999 (patch)
tree5a55f5006585c9cdde05163251fd99da243575b5 /layout.c
parent6c9862662fd2cccdc55be9d447a27b10f33ed8ea (diff)
Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last
time now I've configured emacs to make them displayed in really annoying colours...
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/layout.c b/layout.c
index 0cf6e387..7835e3f9 100644
--- a/layout.c
+++ b/layout.c
@@ -45,13 +45,13 @@ layout_create_cell(struct layout_cell *lcparent)
lc->parent = lcparent;
TAILQ_INIT(&lc->cells);
-
+
lc->sx = UINT_MAX;
lc->sy = UINT_MAX;
-
+
lc->xoff = UINT_MAX;
lc->yoff = UINT_MAX;
-
+
lc->wp = NULL;
return (lc);
@@ -201,8 +201,8 @@ layout_fix_panes(struct window *w, u_int wsx, u_int wsy)
if (sx < 1)
sx = lc->sx;
}
-
- /*
+
+ /*
* Similarly for the vertical size; the minimum vertical size
* is two because scroll regions cannot be one line.
*/
@@ -231,7 +231,7 @@ layout_resize_check(struct layout_cell *lc, enum layout_type type)
available = lc->sx;
else
available = lc->sy;
-
+
if (available > PANE_MINIMUM)
available -= PANE_MINIMUM;
else
@@ -269,7 +269,7 @@ layout_resize_adjust(struct layout_cell *lc, enum layout_type type, int change)
lc->sx += change;
else
lc->sy += change;
-
+
/* If this is a leaf cell, that is all that is necessary. */
if (type == LAYOUT_WINDOWPANE)
return;
@@ -281,8 +281,8 @@ layout_resize_adjust(struct layout_cell *lc, enum layout_type type, int change)
return;
}
- /*
- * Child cell runs in the same direction. Adjust each child equally
+ /*
+ * Child cell runs in the same direction. Adjust each child equally
* until no further change is possible.
*/
while (change != 0) {
@@ -327,10 +327,10 @@ layout_resize(struct window *w, u_int sx, u_int sy)
struct layout_cell *lc = w->layout_root;
int xlimit, ylimit, xchange, ychange;
- /*
+ /*
* Adjust horizontally. Do not attempt to reduce the layout lower than
* the minimum (more than the amount returned by layout_resize_check).
- *
+ *
* This can mean that the window size is smaller than the total layout
* size: redrawing this is handled at a higher level, but it does leave
* a problem with growing the window size here: if the current size is
@@ -366,7 +366,7 @@ layout_resize(struct window *w, u_int sx, u_int sy)
}
if (ychange != 0)
layout_resize_adjust(lc, LAYOUT_TOPBOTTOM, ychange);
-
+
/* Fix cell offsets. */
layout_fix_offsets(lc);
layout_fix_panes(w, sx, sy);
@@ -408,7 +408,7 @@ layout_resize_pane(struct window_pane *wp, enum layout_type type, int change)
if (size == 0) /* no more change possible */
break;
}
-
+
/* Fix cell offsets. */
layout_fix_offsets(wp->window->layout_root);
layout_fix_panes(wp->window, wp->window->sx, wp->window->sy);
@@ -423,14 +423,14 @@ layout_resize_pane_grow(
/* Growing. Always add to the current cell. */
lcadd = lc;
-
+
/* Look towards the tail for a suitable cell for reduction. */
lcremove = TAILQ_NEXT(lc, entry);
while (lcremove != NULL) {
size = layout_resize_check(lcremove, type);
if (size > 0)
break;
- lcremove = TAILQ_NEXT(lcremove, entry);
+ lcremove = TAILQ_NEXT(lcremove, entry);
}
/* If none found, look towards the head. */
@@ -514,7 +514,7 @@ layout_split_pane(struct window_pane *wp,
default:
fatalx("bad layout type");
}
-
+
if (lc->parent != NULL && lc->parent->type == type) {
/*
* If the parent exists and is of the same type as the split,
@@ -528,7 +528,7 @@ layout_split_pane(struct window_pane *wp,
/*
* Otherwise create a new parent and insert it.
*/
-
+
/* Create and insert the replacement parent. */
lcparent = layout_create_cell(lc->parent);
layout_make_node(lcparent, type);
@@ -537,11 +537,11 @@ layout_split_pane(struct window_pane *wp,
wp->window->layout_root = lcparent;
else
TAILQ_REPLACE(&lc->parent->cells, lc, lcparent, entry);
-
+
/* Insert the old cell. */
lc->parent = lcparent;
TAILQ_INSERT_HEAD(&lcparent->cells, lc, entry);
-
+
/* Create the new child cell. */
lcnew = layout_create_cell(lcparent);
TAILQ_INSERT_TAIL(&lcparent->cells, lcnew, entry);
@@ -554,7 +554,7 @@ layout_split_pane(struct window_pane *wp,
case LAYOUT_LEFTRIGHT:
if (size < 0)
size2 = ((sx + 1) / 2) - 1;
- else
+ else
size2 = size;
if (size2 < PANE_MINIMUM)
size2 = PANE_MINIMUM;
@@ -600,7 +600,7 @@ layout_close_pane(struct window_pane *wp)
lc = wp->layout_cell;
lcparent = lc->parent;
- /*
+ /*
* If no parent, this is the last pane so window close is imminent and
* there is no need to resize anything.
*/
@@ -623,8 +623,8 @@ layout_close_pane(struct window_pane *wp)
/* Remove this from the parent's list. */
TAILQ_REMOVE(&lcparent->cells, lc, entry);
layout_free_cell(lc);
-
- /*
+
+ /*
* If the parent now has one cell, remove the parent from the tree and
* replace it by that cell.
*/