Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam 2014-02-19 15:05:07 +00:00
commit ca1d78f523
5 changed files with 12 additions and 7 deletions

View File

@ -169,6 +169,7 @@ cmd_load_buffer_callback(struct client *c, int closed, void *data)
/* No context so can't use server_client_msg_error. */
evbuffer_add_printf(c->stderr_data, "no buffer %d\n", *buffer);
server_push_stderr(c);
free(pdata);
}
free(data);

View File

@ -307,11 +307,13 @@ cmd_set_option_set(struct cmd *self, struct cmd_q *cmdq,
break;
case OPTIONS_TABLE_COLOUR:
o = cmd_set_option_colour(self, cmdq, oe, oo, value);
style_update_new(oo, o->name, oe->style);
if (o != NULL)
style_update_new(oo, o->name, oe->style);
break;
case OPTIONS_TABLE_ATTRIBUTES:
o = cmd_set_option_attributes(self, cmdq, oe, oo, value);
style_update_new(oo, o->name, oe->style);
if (o != NULL)
style_update_new(oo, o->name, oe->style);
break;
case OPTIONS_TABLE_FLAG:
o = cmd_set_option_flag(self, cmdq, oe, oo, value);

View File

@ -130,8 +130,10 @@ paste_replace(struct paste_stack *ps, u_int idx, char *data, size_t size)
{
struct paste_buffer *pb;
if (size == 0)
if (size == 0) {
free(data);
return (0);
}
if (idx >= ARRAY_LENGTH(ps))
return (-1);

View File

@ -323,9 +323,9 @@ server_client_check_mouse(struct client *c, struct window_pane *wp)
else if (statusat > 0 && m->y >= (u_int)statusat)
m->y = statusat - 1;
/* Is this a pane selection? Allow down only in copy mode. */
/* Is this a pane selection? */
if (options_get_number(oo, "mouse-select-pane") &&
(m->event == MOUSE_EVENT_DOWN || wp->mode != &window_copy_mode)) {
(m->event == MOUSE_EVENT_DOWN || m->event == MOUSE_EVENT_WHEEL)) {
window_set_active_at(wp->window, m->x, m->y);
server_redraw_window_borders(wp->window);
wp = wp->window->active; /* may have changed */

View File

@ -1455,8 +1455,8 @@ window_copy_copy_buffer(struct window_pane *wp, int idx, void *buf, size_t len)
if (idx == -1) {
limit = options_get_number(&global_options, "buffer-limit");
paste_add(&global_buffers, buf, len, limit);
} else
paste_replace(&global_buffers, idx, buf, len);
} else if (paste_replace(&global_buffers, idx, buf, len) != 0)
free(buf);
}
void