diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2010-12-30 23:16:18 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2010-12-30 23:16:18 +0000 |
commit | cc42614fa92a0fd93ae359af6562401a2d3d00d7 (patch) | |
tree | 48971a7a344f23f480e8d8aa32c928e1bb537a60 /window-copy.c | |
parent | 2231e72968629d67575b18979fed13b4f5ad730b (diff) | |
download | rtmux-cc42614fa92a0fd93ae359af6562401a2d3d00d7.tar.gz rtmux-cc42614fa92a0fd93ae359af6562401a2d3d00d7.tar.bz2 rtmux-cc42614fa92a0fd93ae359af6562401a2d3d00d7.zip |
Change from a per-session stack of buffers to one global stack which is
much more convenient and also simplifies lot of code. This renders
copy-buffer useless and makes buffer-limit now a server option.
By Tiago Cunha.
Diffstat (limited to 'window-copy.c')
-rw-r--r-- | window-copy.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/window-copy.c b/window-copy.c index 3cc7e4c1..1cdb88d8 100644 --- a/window-copy.c +++ b/window-copy.c @@ -52,7 +52,7 @@ void window_copy_goto_line(struct window_pane *, const char *); void window_copy_update_cursor(struct window_pane *, u_int, u_int); void window_copy_start_selection(struct window_pane *); int window_copy_update_selection(struct window_pane *); -void window_copy_copy_selection(struct window_pane *, struct session *); +void window_copy_copy_selection(struct window_pane *); void window_copy_clear_selection(struct window_pane *); void window_copy_copy_line( struct window_pane *, char **, size_t *, u_int, u_int, u_int); @@ -506,7 +506,7 @@ window_copy_key(struct window_pane *wp, struct session *sess, int key) break; case MODEKEYCOPY_COPYSELECTION: if (sess != NULL) { - window_copy_copy_selection(wp, sess); + window_copy_copy_selection(wp); window_pane_reset_mode(wp); return; } @@ -796,7 +796,7 @@ window_copy_mouse( s->mode &= ~MODE_MOUSE_ANY; s->mode |= MODE_MOUSE_STANDARD; if (sess != NULL) { - window_copy_copy_selection(wp, sess); + window_copy_copy_selection(wp); window_pane_reset_mode(wp); } } @@ -1210,7 +1210,7 @@ window_copy_update_selection(struct window_pane *wp) } void -window_copy_copy_selection(struct window_pane *wp, struct session *sess) +window_copy_copy_selection(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; struct screen *s = &data->screen; @@ -1305,8 +1305,8 @@ window_copy_copy_selection(struct window_pane *wp, struct session *sess) off--; /* remove final \n */ /* Add the buffer to the stack. */ - limit = options_get_number(&sess->options, "buffer-limit"); - paste_add(&sess->buffers, buf, off, limit); + limit = options_get_number(&global_options, "buffer-limit"); + paste_add(&global_buffers, buf, off, limit); } void |