summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2015-12-11 19:59:08 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2015-12-11 19:59:08 +0000
commit5a5db02b8514eff40b97b3f3e4e85a3d948b57da (patch)
treeb365177fbccd29ab040ae598fa22a6bf2e10638d
parent38cc1a1843b370eaeff749802d1d8803b73c4b93 (diff)
parent2a6b2153280278d356dfbdd2af36887d5a1c8763 (diff)
Merge branch 'master' of github.com:tmux/tmux
-rw-r--r--cmd-list-windows.c4
-rw-r--r--layout.c22
-rw-r--r--screen-write.c12
-rw-r--r--status.c4
-rw-r--r--tmux.111
-rw-r--r--tmux.h38
-rw-r--r--tty-term.c8
-rw-r--r--tty.c12
-rw-r--r--window-choose.c32
9 files changed, 75 insertions, 68 deletions
diff --git a/cmd-list-windows.c b/cmd-list-windows.c
index 81793e10..1eaee2d7 100644
--- a/cmd-list-windows.c
+++ b/cmd-list-windows.c
@@ -81,8 +81,8 @@ cmd_list_windows_server(struct cmd *self, struct cmd_q *cmdq)
}
void
-cmd_list_windows_session(
- struct cmd *self, struct session *s, struct cmd_q *cmdq, int type)
+cmd_list_windows_session(struct cmd *self, struct session *s,
+ struct cmd_q *cmdq, int type)
{
struct args *args = self->args;
struct winlink *wl;
diff --git a/layout.c b/layout.c
index 266d1f39..c448814a 100644
--- a/layout.c
+++ b/layout.c
@@ -85,9 +85,9 @@ layout_print_cell(struct layout_cell *lc, const char *hdr, u_int n)
{
struct layout_cell *lcchild;
- log_debug(
- "%s:%*s%p type %u [parent %p] wp=%p [%u,%u %ux%u]", hdr, n, " ", lc,
- lc->type, lc->parent, lc->wp, lc->xoff, lc->yoff, lc->sx, lc->sy);
+ log_debug("%s:%*s%p type %u [parent %p] wp=%p [%u,%u %ux%u]", hdr, n,
+ " ", lc, lc->type, lc->parent, lc->wp, lc->xoff, lc->yoff, lc->sx,
+ lc->sy);
switch (lc->type) {
case LAYOUT_LEFTRIGHT:
case LAYOUT_TOPBOTTOM:
@@ -100,8 +100,8 @@ layout_print_cell(struct layout_cell *lc, const char *hdr, u_int n)
}
void
-layout_set_size(
- struct layout_cell *lc, u_int sx, u_int sy, u_int xoff, u_int yoff)
+layout_set_size(struct layout_cell *lc, u_int sx, u_int sy, u_int xoff,
+ u_int yoff)
{
lc->sx = sx;
lc->sy = sy;
@@ -521,8 +521,8 @@ layout_resize_pane(struct window_pane *wp, enum layout_type type, int change)
/* Helper function to grow pane. */
int
-layout_resize_pane_grow(
- struct layout_cell *lc, enum layout_type type, int needed)
+layout_resize_pane_grow(struct layout_cell *lc, enum layout_type type,
+ int needed)
{
struct layout_cell *lcadd, *lcremove;
u_int size;
@@ -562,8 +562,8 @@ layout_resize_pane_grow(
/* Helper function to shrink pane. */
int
-layout_resize_pane_shrink(
- struct layout_cell *lc, enum layout_type type, int needed)
+layout_resize_pane_shrink(struct layout_cell *lc, enum layout_type type,
+ int needed)
{
struct layout_cell *lcadd, *lcremove;
u_int size;
@@ -605,8 +605,8 @@ layout_assign_pane(struct layout_cell *lc, struct window_pane *wp)
* split. This must be followed by layout_assign_pane before much else happens!
**/
struct layout_cell *
-layout_split_pane(
- struct window_pane *wp, enum layout_type type, int size, int insert_before)
+layout_split_pane(struct window_pane *wp, enum layout_type type, int size,
+ int insert_before)
{
struct layout_cell *lc, *lcparent, *lcnew, *lc1, *lc2;
u_int sx, sy, xoff, yoff, size1, size2;
diff --git a/screen-write.c b/screen-write.c
index 53067efe..e53d3799 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -767,8 +767,8 @@ screen_write_reverseindex(struct screen_write_ctx *ctx)
/* Set scroll region. */
void
-screen_write_scrollregion(
- struct screen_write_ctx *ctx, u_int rupper, u_int rlower)
+screen_write_scrollregion(struct screen_write_ctx *ctx, u_int rupper,
+ u_int rlower)
{
struct screen *s = ctx->s;
@@ -874,16 +874,16 @@ screen_write_clearscreen(struct screen_write_ctx *ctx)
{
struct screen *s = ctx->s;
struct tty_ctx ttyctx;
+ u_int sx = screen_size_x(s);
+ u_int sy = screen_size_y(s);
screen_write_initctx(ctx, &ttyctx, 0);
/* Scroll into history if it is enabled. */
if (s->grid->flags & GRID_HISTORY)
grid_view_clear_history(s->grid);
- else {
- grid_view_clear(
- s->grid, 0, 0, screen_size_x(s), screen_size_y(s));
- }
+ else
+ grid_view_clear(s->grid, 0, 0, sx, sy);
tty_write(tty_cmd_clearscreen, &ttyctx);
}
diff --git a/status.c b/status.c
index b555a9de..ca78bd53 100644
--- a/status.c
+++ b/status.c
@@ -1124,8 +1124,8 @@ status_prompt_key(struct client *c, key_code key)
}
if (c->prompt_flags & PROMPT_SINGLE) {
- if (c->prompt_callbackfn(
- c->prompt_data, c->prompt_buffer) == 0)
+ if (c->prompt_callbackfn(c->prompt_data,
+ c->prompt_buffer) == 0)
status_prompt_clear(c);
}
diff --git a/tmux.1 b/tmux.1
index ba902ed6..7a2d87d4 100644
--- a/tmux.1
+++ b/tmux.1
@@ -420,6 +420,10 @@ If a session is omitted, the current session is used if available; if no
current session is available, the most recently used is chosen.
.Pp
.Ar target-window
+(or
+.Ar src-window
+or
+.Ar dst-window )
specifies a window in the form
.Em session Ns \&: Ns Em window .
.Em session
@@ -475,8 +479,11 @@ Each has a single-character alternative form.
.El
.Pp
.Ar target-pane
-may be a
-pane ID or takes a similar form to
+(or
+.Ar src-pane
+or
+.Ar dst-pane )
+may be a pane ID or takes a similar form to
.Ar target-window
but with the optional addition of a period followed by a pane index or pane ID,
for example:
diff --git a/tmux.h b/tmux.h
index 82a04068..59bf9475 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1666,10 +1666,10 @@ void tty_term_free(struct tty_term *);
int tty_term_has(struct tty_term *, enum tty_code_code);
const char *tty_term_string(struct tty_term *, enum tty_code_code);
const char *tty_term_string1(struct tty_term *, enum tty_code_code, int);
-const char *tty_term_string2(
- struct tty_term *, enum tty_code_code, int, int);
-const char *tty_term_ptr1(
- struct tty_term *, enum tty_code_code, const void *);
+const char *tty_term_string2(struct tty_term *, enum tty_code_code, int,
+ int);
+const char *tty_term_ptr1(struct tty_term *, enum tty_code_code,
+ const void *);
const char *tty_term_ptr2(struct tty_term *, enum tty_code_code,
const void *, const void *);
int tty_term_number(struct tty_term *, enum tty_code_code);
@@ -1906,8 +1906,8 @@ void grid_move_lines(struct grid *, u_int, u_int, u_int);
void grid_move_cells(struct grid *, u_int, u_int, u_int, u_int);
char *grid_string_cells(struct grid *, u_int, u_int, u_int,
struct grid_cell **, int, int, int);
-void grid_duplicate_lines(
- struct grid *, u_int, struct grid *, u_int, u_int);
+void grid_duplicate_lines(struct grid *, u_int, struct grid *, u_int,
+ u_int);
u_int grid_reflow(struct grid *, struct grid *, u_int);
/* grid-view.c */
@@ -2058,14 +2058,14 @@ void window_pane_alternate_on(struct window_pane *,
struct grid_cell *, int);
void window_pane_alternate_off(struct window_pane *,
struct grid_cell *, int);
-int window_pane_set_mode(
- struct window_pane *, const struct window_mode *);
+int window_pane_set_mode(struct window_pane *,
+ const struct window_mode *);
void window_pane_reset_mode(struct window_pane *);
void window_pane_key(struct window_pane *, struct client *,
struct session *, key_code, struct mouse_event *);
int window_pane_visible(struct window_pane *);
-char *window_pane_search(
- struct window_pane *, const char *, u_int *);
+char *window_pane_search(struct window_pane *, const char *,
+ u_int *);
char *window_printable_flags(struct session *, struct winlink *);
struct window_pane *window_pane_find_up(struct window_pane *);
struct window_pane *window_pane_find_down(struct window_pane *);
@@ -2081,17 +2081,17 @@ u_int layout_count_cells(struct layout_cell *);
struct layout_cell *layout_create_cell(struct layout_cell *);
void layout_free_cell(struct layout_cell *);
void layout_print_cell(struct layout_cell *, const char *, u_int);
-void layout_destroy_cell(struct layout_cell *, struct layout_cell **);
-void layout_set_size(
- struct layout_cell *, u_int, u_int, u_int, u_int);
-void layout_make_leaf(
- struct layout_cell *, struct window_pane *);
+void layout_destroy_cell(struct layout_cell *,
+ struct layout_cell **);
+void layout_set_size(struct layout_cell *, u_int, u_int, u_int,
+ u_int);
+void layout_make_leaf(struct layout_cell *, struct window_pane *);
void layout_make_node(struct layout_cell *, enum layout_type);
void layout_fix_offsets(struct layout_cell *);
void layout_fix_panes(struct window *, u_int, u_int);
u_int layout_resize_check(struct layout_cell *, enum layout_type);
-void layout_resize_adjust(
- struct layout_cell *, enum layout_type, int);
+void layout_resize_adjust(struct layout_cell *, enum layout_type,
+ int);
void layout_init(struct window *, struct window_pane *);
void layout_free(struct window *);
void layout_resize(struct window *, u_int, u_int);
@@ -2100,8 +2100,8 @@ void layout_resize_pane(struct window_pane *, enum layout_type,
void layout_resize_pane_to(struct window_pane *, enum layout_type,
u_int);
void layout_assign_pane(struct layout_cell *, struct window_pane *);
-struct layout_cell *layout_split_pane(
- struct window_pane *, enum layout_type, int, int);
+struct layout_cell *layout_split_pane(struct window_pane *, enum layout_type,
+ int, int);
void layout_close_pane(struct window_pane *);
/* layout-custom.c */
diff --git a/tty-term.c b/tty-term.c
index 21756e51..df69bd15 100644
--- a/tty-term.c
+++ b/tty-term.c
@@ -409,12 +409,12 @@ tty_term_find(char *name, int fd, char **cause)
if (setupterm(name, fd, &error) != OK) {
switch (error) {
case 1:
- xasprintf(
- cause, "can't use hardcopy terminal: %s", name);
+ xasprintf(cause, "can't use hardcopy terminal: %s",
+ name);
break;
case 0:
- xasprintf(
- cause, "missing or unsuitable terminal: %s", name);
+ xasprintf(cause, "missing or unsuitable terminal: %s",
+ name);
break;
case -1:
xasprintf(cause, "can't find terminfo database");
diff --git a/tty.c b/tty.c
index 42be6d9f..da5eac4d 100644
--- a/tty.c
+++ b/tty.c
@@ -48,8 +48,8 @@ void tty_colours_bg(struct tty *, const struct grid_cell *);
int tty_large_region(struct tty *, const struct tty_ctx *);
int tty_fake_bce(const struct tty *, const struct window_pane *);
void tty_redraw_region(struct tty *, const struct tty_ctx *);
-void tty_emulate_repeat(
- struct tty *, enum tty_code_code, enum tty_code_code, u_int);
+void tty_emulate_repeat(struct tty *, enum tty_code_code, enum tty_code_code,
+ u_int);
void tty_repeat_space(struct tty *, u_int);
void tty_cell(struct tty *, const struct grid_cell *,
const struct window_pane *);
@@ -161,8 +161,8 @@ tty_open(struct tty *tty, char **cause)
tty->flags &= ~(TTY_NOCURSOR|TTY_FREEZE|TTY_TIMER);
- tty->event = bufferevent_new(
- tty->fd, tty_read_callback, NULL, tty_error_callback, tty);
+ tty->event = bufferevent_new(tty->fd, tty_read_callback, NULL,
+ tty_error_callback, tty);
tty_start_tty(tty);
@@ -1188,8 +1188,8 @@ tty_reset(struct tty *tty)
/* Set region inside pane. */
void
-tty_region_pane(
- struct tty *tty, const struct tty_ctx *ctx, u_int rupper, u_int rlower)
+tty_region_pane(struct tty *tty, const struct tty_ctx *ctx, u_int rupper,
+ u_int rlower)
{
tty_region(tty, ctx->yoff + rupper, ctx->yoff + rlower);
}
diff --git a/window-choose.c b/window-choose.c
index 35170c65..fdfc47a0 100644
--- a/window-choose.c
+++ b/window-choose.c
@@ -35,11 +35,11 @@ void window_choose_default_callback(struct window_choose_data *);
struct window_choose_mode_item *window_choose_get_item(struct window_pane *,
key_code, struct mouse_event *);
-void window_choose_fire_callback(
- struct window_pane *, struct window_choose_data *);
+void window_choose_fire_callback(struct window_pane *,
+ struct window_choose_data *);
void window_choose_redraw_screen(struct window_pane *);
-void window_choose_write_line(
- struct window_pane *, struct screen_write_ctx *, u_int);
+void window_choose_write_line(struct window_pane *,
+ struct screen_write_ctx *, u_int);
void window_choose_scroll_up(struct window_pane *);
void window_choose_scroll_down(struct window_pane *);
@@ -299,8 +299,8 @@ window_choose_resize(struct window_pane *wp, u_int sx, u_int sy)
}
void
-window_choose_fire_callback(
- struct window_pane *wp, struct window_choose_data *wcd)
+window_choose_fire_callback(struct window_pane *wp,
+ struct window_choose_data *wcd)
{
struct window_choose_mode_data *data = wp->modedata;
@@ -614,10 +614,10 @@ window_choose_key(struct window_pane *wp, __unused struct client *c,
window_choose_scroll_up(wp);
else {
screen_write_start(&ctx, wp, NULL);
- window_choose_write_line(
- wp, &ctx, data->selected - data->top);
- window_choose_write_line(
- wp, &ctx, data->selected + 1 - data->top);
+ window_choose_write_line(wp, &ctx,
+ data->selected - data->top);
+ window_choose_write_line(wp, &ctx,
+ data->selected + 1 - data->top);
screen_write_stop(&ctx);
}
break;
@@ -634,10 +634,10 @@ window_choose_key(struct window_pane *wp, __unused struct client *c,
if (data->selected < data->top + screen_size_y(s)) {
screen_write_start(&ctx, wp, NULL);
- window_choose_write_line(
- wp, &ctx, data->selected - data->top);
- window_choose_write_line(
- wp, &ctx, data->selected - 1 - data->top);
+ window_choose_write_line(wp, &ctx,
+ data->selected - data->top);
+ window_choose_write_line(wp, &ctx,
+ data->selected - 1 - data->top);
screen_write_stop(&ctx);
} else
window_choose_scroll_down(wp);
@@ -649,8 +649,8 @@ window_choose_key(struct window_pane *wp, __unused struct client *c,
data->selected--;
window_choose_scroll_up(wp);
screen_write_start(&ctx, wp, NULL);
- window_choose_write_line(
- wp, &ctx, screen_size_y(s) - 1);
+ window_choose_write_line(wp, &ctx,
+ screen_size_y(s) - 1);
screen_write_stop(&ctx);
} else
window_choose_scroll_up(wp);