mirror of
https://github.com/tmux/tmux.git
synced 2026-07-21 16:31:29 +00:00
fixes from feedback.
Also moved away from individual allocations and implemented basic string views.
This commit is contained in:
8
format.c
8
format.c
@@ -854,7 +854,7 @@ format_cb_window_layout(struct format_tree *ft)
|
||||
struct layout_cell *lcroot;
|
||||
int flags = 0;
|
||||
|
||||
if (w == NULL || c == NULL)
|
||||
if (w == NULL)
|
||||
return (NULL);
|
||||
|
||||
if (w->saved_layout_root != NULL)
|
||||
@@ -862,7 +862,7 @@ format_cb_window_layout(struct format_tree *ft)
|
||||
else
|
||||
lcroot = w->layout_root;
|
||||
|
||||
if (c->flags & CLIENT_CONTROL &&
|
||||
if (c != NULL && c->flags & CLIENT_CONTROL &&
|
||||
~c->flags & CLIENT_CONTROL_NEWLAYOUTS)
|
||||
flags |= LAYOUT_CUSTOM_OLD_FORMAT;
|
||||
return (layout_dump(w, lcroot, flags));
|
||||
@@ -876,10 +876,10 @@ format_cb_window_visible_layout(struct format_tree *ft)
|
||||
struct window *w = ft->w;
|
||||
int flags = 0;
|
||||
|
||||
if (w == NULL || c == NULL)
|
||||
if (w == NULL)
|
||||
return (NULL);
|
||||
|
||||
if (c->flags & CLIENT_CONTROL &&
|
||||
if (c != NULL && c->flags & CLIENT_CONTROL &&
|
||||
~c->flags & CLIENT_CONTROL_NEWLAYOUTS)
|
||||
flags |= LAYOUT_CUSTOM_OLD_FORMAT;
|
||||
return (layout_dump(w, w->layout_root, flags));
|
||||
|
||||
692
layout-custom.c
692
layout-custom.c
File diff suppressed because it is too large
Load Diff
2
layout.c
2
layout.c
@@ -264,7 +264,7 @@ layout_cell_is_tiled(struct layout_cell *lc)
|
||||
return is_leaf && !is_floating;
|
||||
}
|
||||
|
||||
static int
|
||||
int
|
||||
layout_cell_has_tiled_child(struct layout_cell *lc)
|
||||
{
|
||||
struct layout_cell *lcchild;
|
||||
|
||||
1
tmux.h
1
tmux.h
@@ -3815,6 +3815,7 @@ void layout_make_leaf(struct layout_cell *, struct window_pane *);
|
||||
void layout_make_node(struct layout_cell *, enum layout_type);
|
||||
void layout_fix_zindexes(struct window *);
|
||||
int layout_cell_is_tiled(struct layout_cell *);
|
||||
int layout_cell_has_tiled_child(struct layout_cell *);
|
||||
int layout_add_horizontal_border(struct layout_cell *,
|
||||
struct layout_cell *, int);
|
||||
void layout_fix_offsets(struct window *);
|
||||
|
||||
Reference in New Issue
Block a user