=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/window-copy.c,v retrieving revision 1.304 retrieving revision 1.305 diff -c -r1.304 -r1.305 *** src/usr.bin/tmux/window-copy.c 2020/09/18 11:23:29 1.304 --- src/usr.bin/tmux/window-copy.c 2020/09/22 08:41:27 1.305 *************** *** 1,4 **** ! /* $OpenBSD: window-copy.c,v 1.304 2020/09/18 11:23:29 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: window-copy.c,v 1.305 2020/09/22 08:41:27 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 109,115 **** static void window_copy_cursor_end_of_line(struct window_mode_entry *); static void window_copy_other_end(struct window_mode_entry *); static void window_copy_cursor_left(struct window_mode_entry *); ! static void window_copy_cursor_right(struct window_mode_entry *); static void window_copy_cursor_up(struct window_mode_entry *, int); static void window_copy_cursor_down(struct window_mode_entry *, int); static void window_copy_cursor_jump(struct window_mode_entry *); --- 109,115 ---- static void window_copy_cursor_end_of_line(struct window_mode_entry *); static void window_copy_other_end(struct window_mode_entry *); static void window_copy_cursor_left(struct window_mode_entry *); ! static void window_copy_cursor_right(struct window_mode_entry *, int); static void window_copy_cursor_up(struct window_mode_entry *, int); static void window_copy_cursor_down(struct window_mode_entry *, int); static void window_copy_cursor_jump(struct window_mode_entry *); *************** *** 1093,1099 **** u_int np = wme->prefix; for (; np != 0; np--) ! window_copy_cursor_right(wme); return (WINDOW_COPY_CMD_NOTHING); } --- 1093,1099 ---- u_int np = wme->prefix; for (; np != 0; np--) ! window_copy_cursor_right(wme, 0); return (WINDOW_COPY_CMD_NOTHING); } *************** *** 2962,2968 **** window_copy_search_marks(wme, &ss, regex, visible_only); if (foundlen != 0) { for (i = 0; i < foundlen; i++) ! window_copy_cursor_right(wme); } } window_copy_redraw_screen(wme); --- 2962,2968 ---- window_copy_search_marks(wme, &ss, regex, visible_only); if (foundlen != 0) { for (i = 0; i < foundlen; i++) ! window_copy_cursor_right(wme, 1); } } window_copy_redraw_screen(wme); *************** *** 4142,4148 **** } static void ! window_copy_cursor_right(struct window_mode_entry *wme) { struct window_copy_mode_data *data = wme->data; u_int px, py, yy, cx, cy; --- 4142,4148 ---- } static void ! window_copy_cursor_right(struct window_mode_entry *wme, int all) { struct window_copy_mode_data *data = wme->data; u_int px, py, yy, cx, cy; *************** *** 4150,4156 **** py = screen_hsize(data->backing) + data->cy - data->oy; yy = screen_hsize(data->backing) + screen_size_y(data->backing) - 1; ! if (data->screen.sel != NULL && data->rectflag) px = screen_size_x(&data->screen); else px = window_copy_find_length(wme, py); --- 4150,4156 ---- py = screen_hsize(data->backing) + data->cy - data->oy; yy = screen_hsize(data->backing) + screen_size_y(data->backing) - 1; ! if (all || (data->screen.sel != NULL && data->rectflag)) px = screen_size_x(&data->screen); else px = window_copy_find_length(wme, py);