summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--window-copy.c14
-rw-r--r--window.c1
2 files changed, 1 insertions, 14 deletions
diff --git a/window-copy.c b/window-copy.c
index d865287a..c2d9b9ad 100644
--- a/window-copy.c
+++ b/window-copy.c
@@ -201,22 +201,10 @@ window_copy_init(struct window_pane *wp, __unused struct cmd_find_state *fs,
struct window_copy_mode_data *data;
struct screen *s;
- wp->modedata = data = xmalloc(sizeof *data);
-
- data->oy = 0;
- data->cx = 0;
- data->cy = 0;
+ wp->modedata = data = xcalloc(1, sizeof *data);
data->cursordrag = CURSORDRAG_NONE;
-
- data->lastcx = 0;
- data->lastsx = 0;
-
- data->backing_written = 0;
-
data->lineflag = LINE_SEL_NONE;
- data->rectflag = 0;
- data->scroll_exit = 0;
if (wp->searchstr != NULL) {
data->searchtype = WINDOW_COPY_SEARCHUP;
diff --git a/window.c b/window.c
index db6ff8c9..019718f2 100644
--- a/window.c
+++ b/window.c
@@ -894,7 +894,6 @@ window_pane_spawn(struct window_pane *wp, int argc, char **argv,
char *argv0, *cmd, **argvp;
const char *ptr, *first, *home;
struct termios tio2;
- int i;
sigset_t set, oldset;
if (wp->fd != -1) {