=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/window-copy.c,v retrieving revision 1.247 retrieving revision 1.248 diff -c -r1.247 -r1.248 *** src/usr.bin/tmux/window-copy.c 2020/02/24 09:53:59 1.247 --- src/usr.bin/tmux/window-copy.c 2020/03/11 18:46:42 1.248 *************** *** 1,4 **** ! /* $OpenBSD: window-copy.c,v 1.247 2020/02/24 09:53:59 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: window-copy.c,v 1.248 2020/03/11 18:46:42 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 4122,4128 **** struct window_pane *wp; struct window_mode_entry *wme; struct window_copy_mode_data *data; ! u_int x, y; if (c == NULL) return; --- 4122,4128 ---- struct window_pane *wp; struct window_mode_entry *wme; struct window_copy_mode_data *data; ! u_int x, y, yg; if (c == NULL) return; *************** *** 4143,4148 **** --- 4143,4151 ---- c->tty.mouse_drag_release = window_copy_drag_release; data = wme->data; + yg = screen_hsize(data->backing) + y - data->oy; + if (x < data->selrx || x > data->endselrx || yg != data->selry) + data->selflag = SEL_CHAR; switch (data->selflag) { case SEL_WORD: if (data->ws) {