aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server-fn.c2
-rw-r--r--status.c2
-rw-r--r--tmux.h3
-rw-r--r--window-copy.c20
4 files changed, 11 insertions, 16 deletions
diff --git a/server-fn.c b/server-fn.c
index aedd1374..d141f982 100644
--- a/server-fn.c
+++ b/server-fn.c
@@ -1,4 +1,4 @@
-/* $Id: server-fn.c,v 1.103 2010-03-27 15:12:56 nicm Exp $ */
+/* $Id: server-fn.c,v 1.104 2010-04-06 21:45:36 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
diff --git a/status.c b/status.c
index 420b2f76..6169178e 100644
--- a/status.c
+++ b/status.c
@@ -1,4 +1,4 @@
-/* $Id: status.c,v 1.146 2010-03-31 18:24:08 nicm Exp $ */
+/* $Id: status.c,v 1.147 2010-04-06 21:45:36 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
diff --git a/tmux.h b/tmux.h
index b7e47da0..a8902f19 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1,4 +1,4 @@
-/* $Id: tmux.h,v 1.552 2010-04-05 05:11:44 micahcowan Exp $ */
+/* $Id: tmux.h,v 1.553 2010-04-06 21:45:36 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -542,7 +542,6 @@ struct mode_key_table {
#define MODE_MOUSE 0x10
#define MODE_WRAP 0x20 /* whether lines wrap */
-
/*
* A single UTF-8 character.
*
diff --git a/window-copy.c b/window-copy.c
index 223225a2..d65534f3 100644
--- a/window-copy.c
+++ b/window-copy.c
@@ -1,4 +1,4 @@
-/* $Id: window-copy.c,v 1.113 2010-04-05 05:11:44 micahcowan Exp $ */
+/* $Id: window-copy.c,v 1.114 2010-04-06 21:45:36 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -111,9 +111,11 @@ enum window_copy_input_type {
*/
struct window_copy_mode_data {
struct screen screen;
- struct screen *backing;
- struct mode_key_data mdata;
+ struct screen *backing;
+ int backing_written; /* backing display has started */
+
+ struct mode_key_data mdata
u_int oy;
@@ -128,9 +130,6 @@ struct window_copy_mode_data {
u_int lastcx; /* position in last line with content */
u_int lastsx; /* size of last line with content */
- int backing_written; /* where to write next line
- in backing */
-
enum window_copy_input_type inputtype;
const char *inputprompt;
char *inputstr;
@@ -196,17 +195,14 @@ window_copy_init(struct window_pane *wp)
void
window_copy_init_from_pane(struct window_pane *wp)
{
- struct window_copy_mode_data *data;
- struct screen *s;
+ struct window_copy_mode_data *data = wp->modedata;
+ struct screen *s = &data->screen;
struct screen_write_ctx ctx;
u_int i;
if (wp->mode != &window_copy_mode)
fatalx("not in copy mode");
- data = wp->modedata;
- s = &data->screen;
-
data->backing = &wp->base;
data->cx = data->backing->cx;
data->cy = data->backing->cy;
@@ -289,7 +285,7 @@ window_copy_vadd(struct window_pane *wp, const char *fmt, va_list ap)
screen_write_carriagereturn(&back_ctx);
screen_write_linefeed(&back_ctx, 0);
} else
- data->backing_written++;
+ data->backing_written = 1;
screen_write_vnputs(&back_ctx, 0, &gc, utf8flag, fmt, ap);
screen_write_stop(&back_ctx);