diff options
author | Thomas Adam <thomas@xteddy.org> | 2018-08-10 11:41:07 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2018-08-10 11:41:07 +0100 |
commit | a3685486454051d26c820db4ea4cdfc094172c1c (patch) | |
tree | 5cd06a20a767d2350c7ffa8c5bf1c8190878195d | |
parent | 13fe06a459f8dd62f9c3ee394e65a0fa7b1ee029 (diff) | |
parent | 87e87030fe8b5d7f25404e21f4dfdf1dfe7fa632 (diff) | |
download | rtmux-a3685486454051d26c820db4ea4cdfc094172c1c.tar.gz rtmux-a3685486454051d26c820db4ea4cdfc094172c1c.tar.bz2 rtmux-a3685486454051d26c820db4ea4cdfc094172c1c.zip |
Merge branch 'obsd-master'
-rw-r--r-- | tmux.h | 7 | ||||
-rw-r--r-- | window-copy.c | 14 |
2 files changed, 5 insertions, 16 deletions
@@ -515,10 +515,11 @@ struct msg_stderr_data { #define ALL_MOUSE_MODES (MODE_MOUSE_STANDARD|MODE_MOUSE_BUTTON|MODE_MOUSE_ALL) /* - * A single UTF-8 character. UTF8_SIZE must be big enough to hold at least one - * combining character as well. + * A single UTF-8 character. UTF8_SIZE must be big enough to hold + * combining characters as well, currently at most five (of three + * bytes) are supported. */ -#define UTF8_SIZE 9 +#define UTF8_SIZE 18 struct utf8_data { u_char data[UTF8_SIZE]; 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; |