aboutsummaryrefslogtreecommitdiff
path: root/layout.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2013-01-17 01:38:21 +0000
committerThomas Adam <thomas@xteddy.org>2013-01-17 01:38:21 +0000
commitde194016ec345db2a2a3e0b0d69080e288623597 (patch)
tree8222c9caa50815342d4ed66f2291c8b986926609 /layout.c
parent675c6b37734a622b4530d35505f897310fdb138c (diff)
parente33ba57c13139bc9ae6e92be169de6dc322e38eb (diff)
downloadrtmux-de194016ec345db2a2a3e0b0d69080e288623597.tar.gz
rtmux-de194016ec345db2a2a3e0b0d69080e288623597.tar.bz2
rtmux-de194016ec345db2a2a3e0b0d69080e288623597.zip
Merge branch 'obsd-master'
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c72
1 files changed, 0 insertions, 72 deletions
diff --git a/layout.c b/layout.c
index 3eaeb5b7..397d90e5 100644
--- a/layout.c
+++ b/layout.c
@@ -19,7 +19,6 @@
#include <sys/types.h>
#include <stdlib.h>
-#include <string.h>
#include "tmux.h"
@@ -747,74 +746,3 @@ layout_close_pane(struct window_pane *wp)
}
notify_window_layout_changed(wp->window);
}
-
-/* Add layout to list. */
-void
-layout_list_add(struct window *w)
-{
- struct last_layout *ll, *ll_last;
- char *layout;
- u_int limit;
-
- layout = layout_dump(w);
-
- ll_last = w->layout_list_last;
- if (ll_last != NULL && strcmp(ll_last->layout, layout) == 0) {
- free(layout);
- return;
- }
-
- ll = xmalloc(sizeof *ll);
- ll->layout = layout;
- if (ll_last == NULL)
- TAILQ_INSERT_TAIL(&w->layout_list, ll, entry);
- else
- TAILQ_INSERT_AFTER(&w->layout_list, ll_last, ll, entry);
- w->layout_list_size++;
- w->layout_list_last = ll;
-
- limit = options_get_number(&w->options, "layout-history-limit");
- while (w->layout_list_size > limit) {
- ll = TAILQ_LAST(&w->layout_list, last_layouts);
- if (ll == w->layout_list_last)
- ll = TAILQ_FIRST(&w->layout_list);
-
- TAILQ_REMOVE(&w->layout_list, ll, entry);
- w->layout_list_size--;
-
- free(ll->layout);
- free(ll);
- }
-}
-
-/* Apply next layout from list. */
-const char *
-layout_list_redo(struct window *w)
-{
- struct last_layout *ll, *ll_last;
-
- ll_last = w->layout_list_last;
- if (ll_last == NULL)
- return (NULL);
- ll = TAILQ_NEXT(ll_last, entry);
- if (ll == NULL)
- return (NULL);
- w->layout_list_last = ll;
- return (ll->layout);
-}
-
-/* Apply previous layout from list. */
-const char *
-layout_list_undo(struct window *w)
-{
- struct last_layout *ll, *ll_last;
-
- ll_last = w->layout_list_last;
- if (ll_last == NULL)
- return (NULL);
- ll = TAILQ_PREV(ll_last, last_layouts, entry);
- if (ll == NULL)
- return (NULL);
- w->layout_list_last = ll;
- return (ll->layout);
-}