diff options
author | nicm <nicm> | 2018-08-05 08:59:30 +0000 |
---|---|---|
committer | nicm <nicm> | 2018-08-05 08:59:30 +0000 |
commit | f5d7a80272ca2d091c5a511019ac4b8d98ca7167 (patch) | |
tree | 6dcbb1bea22dc7339c3243b5ddecf724a69d576c /window-copy.c | |
parent | d6ff630498bbbeb4cd7d28ba4b540724f7c7ed86 (diff) |
calloc the mode data instead of malloc and initialize everything.
Diffstat (limited to 'window-copy.c')
-rw-r--r-- | window-copy.c | 14 |
1 files changed, 1 insertions, 13 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; |