Merge branch 'obsd-master'

Conflicts:
	tmux.h
This commit is contained in:
Thomas Adam 2013-05-25 11:48:12 +01:00
commit 76cb088d16
6 changed files with 15 additions and 6 deletions

4
cmd.c
View File

@ -294,8 +294,8 @@ cmd_print(struct cmd *cmd, char *buf, size_t len)
size_t off, used;
off = xsnprintf(buf, len, "%s ", cmd->entry->name);
if (off < len) {
used = args_print(cmd->args, buf + off, len - off);
if (off + 1 < len) {
used = args_print(cmd->args, buf + off, len - off - 1);
if (used == 0)
off--;
else

View File

@ -226,7 +226,7 @@ input_mouse(struct window_pane *wp, struct session *s, struct mouse_event *m)
len += utf8_split2(m->x + 33, &buf[len]);
len += utf8_split2(m->y + 33, &buf[len]);
} else {
if (m->xb > 223 || m->x >= 222 || m->y > 222)
if (m->xb > 223)
return;
len = xsnprintf(buf, sizeof buf, "\033[M");
buf[len++] = m->xb + 32;

View File

@ -56,7 +56,7 @@ screen_write_reset(struct screen_write_ctx *ctx)
screen_reset_tabs(s);
screen_write_scrollregion(ctx, 0, screen_size_y(s) - 1);
s->mode &= ~(MODE_INSERT|MODE_KCURSOR|MODE_KKEYPAD);
s->mode &= ~(MODE_INSERT|MODE_KCURSOR|MODE_KKEYPAD|MODE_FOCUSON);
s->mode &= ~(ALL_MOUSE_MODES|MODE_MOUSE_UTF8|MODE_MOUSE_SGR);
screen_write_clearscreen(ctx);

View File

@ -366,7 +366,13 @@ void
screen_reflow(struct screen *s, u_int new_x)
{
struct grid *old = s->grid;
u_int change;
s->grid = grid_create(old->sx, old->sy, old->hlimit);
s->cy -= grid_reflow(s->grid, old, new_x);
change = grid_reflow(s->grid, old, new_x);
if (change < s->cy)
s->cy -= change;
else
s->cy = 0;
}

2
tmux.1
View File

@ -3540,7 +3540,7 @@ Lock each client individually by running the command specified by the
.Ic lock-command
option.
.It Xo Ic run-shell
.Fl b
.Op Fl b
.Op Fl t Ar target-pane
.Ar shell-command
.Xc

3
tmux.h
View File

@ -39,6 +39,9 @@
extern char *__progname;
extern char **environ;
/* Default global configuration file. */
#define TMUX_CONF "/etc/tmux.conf"
/* Default prompt history length. */
#define PROMPT_HISTORY 100