=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/window-copy.c,v retrieving revision 1.156 retrieving revision 1.157 diff -c -r1.156 -r1.157 *** src/usr.bin/tmux/window-copy.c 2016/10/11 09:30:36 1.156 --- src/usr.bin/tmux/window-copy.c 2016/10/11 13:21:59 1.157 *************** *** 1,4 **** ! /* $OpenBSD: window-copy.c,v 1.156 2016/10/11 09:30:36 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: window-copy.c,v 1.157 2016/10/11 13:21:59 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 24,99 **** #include "tmux.h" ! const char *window_copy_key_table(struct window_pane *); ! void window_copy_command(struct window_pane *, struct client *, ! struct session *, struct args *, struct mouse_event *); ! struct screen *window_copy_init(struct window_pane *); ! void window_copy_free(struct window_pane *); ! void window_copy_pagedown(struct window_pane *, int); ! void window_copy_next_paragraph(struct window_pane *); ! void window_copy_previous_paragraph(struct window_pane *); ! void window_copy_resize(struct window_pane *, u_int, u_int); ! void window_copy_redraw_selection(struct window_pane *, u_int); ! void window_copy_redraw_lines(struct window_pane *, u_int, u_int); ! void window_copy_redraw_screen(struct window_pane *); ! void window_copy_write_line(struct window_pane *, struct screen_write_ctx *, ! u_int); ! void window_copy_write_lines(struct window_pane *, ! struct screen_write_ctx *, u_int, u_int); ! void window_copy_scroll_to(struct window_pane *, u_int, u_int); ! int window_copy_search_compare(struct grid *, u_int, u_int, struct grid *, ! u_int, int); ! int window_copy_search_lr(struct grid *, struct grid *, u_int *, u_int, ! u_int, u_int, int); ! int window_copy_search_rl(struct grid *, struct grid *, u_int *, u_int, ! u_int, u_int, int); ! void window_copy_move_left(struct screen *, u_int *, u_int *); ! void window_copy_move_right(struct screen *, u_int *, u_int *); ! int window_copy_is_lowercase(const char *); ! void window_copy_search_jump(struct window_pane *, struct grid *, ! struct grid *, u_int, u_int, u_int, int, int, int); ! void window_copy_search(struct window_pane *, const char *, int, int); ! void window_copy_search_up(struct window_pane *, const char *, int); ! void window_copy_search_down(struct window_pane *, const char *, int); ! void window_copy_goto_line(struct window_pane *, const char *); ! void window_copy_update_cursor(struct window_pane *, u_int, u_int); ! void window_copy_start_selection(struct window_pane *); ! int window_copy_update_selection(struct window_pane *, int); ! void *window_copy_get_selection(struct window_pane *, size_t *); ! void window_copy_copy_buffer(struct window_pane *, const char *, void *, ! size_t); ! void window_copy_copy_pipe(struct window_pane *, struct session *, ! const char *, const char *); ! void window_copy_copy_selection(struct window_pane *, const char *); ! void window_copy_append_selection(struct window_pane *, const char *); ! void window_copy_clear_selection(struct window_pane *); ! void window_copy_copy_line(struct window_pane *, char **, size_t *, u_int, ! u_int, u_int); ! int window_copy_in_set(struct window_pane *, u_int, u_int, const char *); ! u_int window_copy_find_length(struct window_pane *, u_int); ! void window_copy_cursor_start_of_line(struct window_pane *); ! void window_copy_cursor_back_to_indentation(struct window_pane *); ! void window_copy_cursor_end_of_line(struct window_pane *); ! void window_copy_other_end(struct window_pane *); ! void window_copy_cursor_left(struct window_pane *); ! void window_copy_cursor_right(struct window_pane *); ! void window_copy_cursor_up(struct window_pane *, int); ! void window_copy_cursor_down(struct window_pane *, int); ! void window_copy_cursor_jump(struct window_pane *); ! void window_copy_cursor_jump_back(struct window_pane *); ! void window_copy_cursor_jump_to(struct window_pane *, int); ! void window_copy_cursor_jump_to_back(struct window_pane *, int); ! void window_copy_cursor_next_word(struct window_pane *, const char *); ! void window_copy_cursor_next_word_end(struct window_pane *, const char *); ! void window_copy_cursor_previous_word(struct window_pane *, const char *); ! void window_copy_scroll_up(struct window_pane *, u_int); ! void window_copy_scroll_down(struct window_pane *, u_int); ! void window_copy_rectangle_toggle(struct window_pane *); ! void window_copy_move_mouse(struct mouse_event *); ! void window_copy_drag_update(struct client *, struct mouse_event *); ! void window_copy_drag_release(struct client *, struct mouse_event *); const struct window_mode window_copy_mode = { .init = window_copy_init, --- 24,105 ---- #include "tmux.h" ! static const char *window_copy_key_table(struct window_pane *); ! static void window_copy_command(struct window_pane *, struct client *, ! struct session *, struct args *, struct mouse_event *); ! static struct screen *window_copy_init(struct window_pane *); ! static void window_copy_free(struct window_pane *); ! static void window_copy_pagedown(struct window_pane *, int); ! static void window_copy_next_paragraph(struct window_pane *); ! static void window_copy_previous_paragraph(struct window_pane *); ! static void window_copy_resize(struct window_pane *, u_int, u_int); ! static void window_copy_redraw_selection(struct window_pane *, u_int); ! static void window_copy_redraw_lines(struct window_pane *, u_int, u_int); ! static void window_copy_redraw_screen(struct window_pane *); ! static void window_copy_write_line(struct window_pane *, ! struct screen_write_ctx *, u_int); ! static void window_copy_write_lines(struct window_pane *, ! struct screen_write_ctx *, u_int, u_int); ! static void window_copy_scroll_to(struct window_pane *, u_int, u_int); ! static int window_copy_search_compare(struct grid *, u_int, u_int, ! struct grid *, u_int, int); ! static int window_copy_search_lr(struct grid *, struct grid *, u_int *, ! u_int, u_int, u_int, int); ! static int window_copy_search_rl(struct grid *, struct grid *, u_int *, ! u_int, u_int, u_int, int); ! static void window_copy_move_left(struct screen *, u_int *, u_int *); ! static void window_copy_move_right(struct screen *, u_int *, u_int *); ! static int window_copy_is_lowercase(const char *); ! static void window_copy_search_jump(struct window_pane *, struct grid *, ! struct grid *, u_int, u_int, u_int, int, int, int); ! static void window_copy_search(struct window_pane *, const char *, int, ! int); ! static void window_copy_search_up(struct window_pane *, const char *, int); ! static void window_copy_search_down(struct window_pane *, const char *, ! int); ! static void window_copy_goto_line(struct window_pane *, const char *); ! static void window_copy_update_cursor(struct window_pane *, u_int, u_int); ! static void window_copy_start_selection(struct window_pane *); ! static int window_copy_update_selection(struct window_pane *, int); ! static void *window_copy_get_selection(struct window_pane *, size_t *); ! static void window_copy_copy_buffer(struct window_pane *, const char *, ! void *, size_t); ! static void window_copy_copy_pipe(struct window_pane *, struct session *, ! const char *, const char *); ! static void window_copy_copy_selection(struct window_pane *, const char *); ! static void window_copy_append_selection(struct window_pane *, ! const char *); ! static void window_copy_clear_selection(struct window_pane *); ! static void window_copy_copy_line(struct window_pane *, char **, size_t *, ! u_int, u_int, u_int); ! static int window_copy_in_set(struct window_pane *, u_int, u_int, ! const char *); ! static u_int window_copy_find_length(struct window_pane *, u_int); ! static void window_copy_cursor_start_of_line(struct window_pane *); ! static void window_copy_cursor_back_to_indentation(struct window_pane *); ! static void window_copy_cursor_end_of_line(struct window_pane *); ! static void window_copy_other_end(struct window_pane *); ! static void window_copy_cursor_left(struct window_pane *); ! static void window_copy_cursor_right(struct window_pane *); ! static void window_copy_cursor_up(struct window_pane *, int); ! static void window_copy_cursor_down(struct window_pane *, int); ! static void window_copy_cursor_jump(struct window_pane *); ! static void window_copy_cursor_jump_back(struct window_pane *); ! static void window_copy_cursor_jump_to(struct window_pane *, int); ! static void window_copy_cursor_jump_to_back(struct window_pane *, int); ! static void window_copy_cursor_next_word(struct window_pane *, ! const char *); ! static void window_copy_cursor_next_word_end(struct window_pane *, ! const char *); ! static void window_copy_cursor_previous_word(struct window_pane *, ! const char *); ! static void window_copy_scroll_up(struct window_pane *, u_int); ! static void window_copy_scroll_down(struct window_pane *, u_int); ! static void window_copy_rectangle_toggle(struct window_pane *); ! static void window_copy_move_mouse(struct mouse_event *); ! static void window_copy_drag_update(struct client *, struct mouse_event *); const struct window_mode window_copy_mode = { .init = window_copy_init, *************** *** 156,162 **** char jumpchar; }; ! struct screen * window_copy_init(struct window_pane *wp) { struct window_copy_mode_data *data; --- 162,168 ---- char jumpchar; }; ! static struct screen * window_copy_init(struct window_pane *wp) { struct window_copy_mode_data *data; *************** *** 229,235 **** screen_size_y(&wp->base), UINT_MAX); } ! void window_copy_free(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; --- 235,241 ---- screen_size_y(&wp->base), UINT_MAX); } ! static void window_copy_free(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; *************** *** 347,353 **** window_copy_redraw_screen(wp); } ! void window_copy_pagedown(struct window_pane *wp, int half_page) { struct window_copy_mode_data *data = wp->modedata; --- 353,359 ---- window_copy_redraw_screen(wp); } ! static void window_copy_pagedown(struct window_pane *wp, int half_page) { struct window_copy_mode_data *data = wp->modedata; *************** *** 395,401 **** window_copy_redraw_screen(wp); } ! void window_copy_previous_paragraph(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; --- 401,407 ---- window_copy_redraw_screen(wp); } ! static void window_copy_previous_paragraph(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; *************** *** 412,418 **** window_copy_scroll_to(wp, 0, oy); } ! void window_copy_next_paragraph(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; --- 418,424 ---- window_copy_scroll_to(wp, 0, oy); } ! static void window_copy_next_paragraph(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; *************** *** 432,438 **** window_copy_scroll_to(wp, ox, oy); } ! void window_copy_resize(struct window_pane *wp, u_int sx, u_int sy) { struct window_copy_mode_data *data = wp->modedata; --- 438,444 ---- window_copy_scroll_to(wp, ox, oy); } ! static void window_copy_resize(struct window_pane *wp, u_int sx, u_int sy) { struct window_copy_mode_data *data = wp->modedata; *************** *** 459,465 **** window_copy_redraw_screen(wp); } ! const char * window_copy_key_table(struct window_pane *wp) { if (options_get_number(wp->window->options, "mode-keys") == MODEKEY_VI) --- 465,471 ---- window_copy_redraw_screen(wp); } ! static const char * window_copy_key_table(struct window_pane *wp) { if (options_get_number(wp->window->options, "mode-keys") == MODEKEY_VI) *************** *** 467,473 **** return ("copy-mode"); } ! void window_copy_command(struct window_pane *wp, struct client *c, struct session *s, struct args *args, struct mouse_event *m) { --- 473,479 ---- return ("copy-mode"); } ! static void window_copy_command(struct window_pane *wp, struct client *c, struct session *s, struct args *args, struct mouse_event *m) { *************** *** 803,809 **** wp->modeprefix = 1; } ! void window_copy_scroll_to(struct window_pane *wp, u_int px, u_int py) { struct window_copy_mode_data *data = wp->modedata; --- 809,815 ---- wp->modeprefix = 1; } ! static void window_copy_scroll_to(struct window_pane *wp, u_int px, u_int py) { struct window_copy_mode_data *data = wp->modedata; *************** *** 829,835 **** window_copy_redraw_screen(wp); } ! int window_copy_search_compare(struct grid *gd, u_int px, u_int py, struct grid *sgd, u_int spx, int cis) { --- 835,841 ---- window_copy_redraw_screen(wp); } ! static int window_copy_search_compare(struct grid *gd, u_int px, u_int py, struct grid *sgd, u_int spx, int cis) { *************** *** 850,856 **** return (memcmp(ud->data, sud->data, ud->size) == 0); } ! int window_copy_search_lr(struct grid *gd, struct grid *sgd, u_int *ppx, u_int py, u_int first, u_int last, int cis) { --- 856,862 ---- return (memcmp(ud->data, sud->data, ud->size) == 0); } ! static int window_copy_search_lr(struct grid *gd, struct grid *sgd, u_int *ppx, u_int py, u_int first, u_int last, int cis) { *************** *** 875,881 **** return (0); } ! int window_copy_search_rl(struct grid *gd, struct grid *sgd, u_int *ppx, u_int py, u_int first, u_int last, int cis) { --- 881,887 ---- return (0); } ! static int window_copy_search_rl(struct grid *gd, struct grid *sgd, u_int *ppx, u_int py, u_int first, u_int last, int cis) { *************** *** 900,906 **** return (0); } ! void window_copy_move_left(struct screen *s, u_int *fx, u_int *fy) { if (*fx == 0) { /* left */ --- 906,912 ---- return (0); } ! static void window_copy_move_left(struct screen *s, u_int *fx, u_int *fy) { if (*fx == 0) { /* left */ *************** *** 912,918 **** *fx = *fx - 1; } ! void window_copy_move_right(struct screen *s, u_int *fx, u_int *fy) { if (*fx == screen_size_x(s) - 1) { /* right */ --- 918,924 ---- *fx = *fx - 1; } ! static void window_copy_move_right(struct screen *s, u_int *fx, u_int *fy) { if (*fx == screen_size_x(s) - 1) { /* right */ *************** *** 924,930 **** *fx = *fx + 1; } ! int window_copy_is_lowercase(const char *ptr) { while (*ptr != '\0') { --- 930,936 ---- *fx = *fx + 1; } ! static int window_copy_is_lowercase(const char *ptr) { while (*ptr != '\0') { *************** *** 941,947 **** * up, down otherwise. If wrap then go to begin/end of grid and try again if * not found. */ ! void window_copy_search_jump(struct window_pane *wp, struct grid *gd, struct grid *sgd, u_int fx, u_int fy, u_int endline, int cis, int wrap, int direction) --- 947,953 ---- * up, down otherwise. If wrap then go to begin/end of grid and try again if * not found. */ ! static void window_copy_search_jump(struct window_pane *wp, struct grid *gd, struct grid *sgd, u_int fx, u_int fy, u_int endline, int cis, int wrap, int direction) *************** *** 984,990 **** * down. If moveflag is 0 then look for string at the current cursor position * as well. */ ! void window_copy_search(struct window_pane *wp, const char *searchstr, int direction, int moveflag) { --- 990,996 ---- * down. If moveflag is 0 then look for string at the current cursor position * as well. */ ! static void window_copy_search(struct window_pane *wp, const char *searchstr, int direction, int moveflag) { *************** *** 1024,1044 **** screen_free(&ss); } ! void window_copy_search_up(struct window_pane *wp, const char *searchstr, int moveflag) { window_copy_search(wp, searchstr, 0, moveflag); } ! void window_copy_search_down(struct window_pane *wp, const char *searchstr, int moveflag) { window_copy_search(wp, searchstr, 1, moveflag); } ! void window_copy_goto_line(struct window_pane *wp, const char *linestr) { struct window_copy_mode_data *data = wp->modedata; --- 1030,1050 ---- screen_free(&ss); } ! static void window_copy_search_up(struct window_pane *wp, const char *searchstr, int moveflag) { window_copy_search(wp, searchstr, 0, moveflag); } ! static void window_copy_search_down(struct window_pane *wp, const char *searchstr, int moveflag) { window_copy_search(wp, searchstr, 1, moveflag); } ! static void window_copy_goto_line(struct window_pane *wp, const char *linestr) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1054,1060 **** window_copy_redraw_screen(wp); } ! void window_copy_write_line(struct window_pane *wp, struct screen_write_ctx *ctx, u_int py) { --- 1060,1066 ---- window_copy_redraw_screen(wp); } ! static void window_copy_write_line(struct window_pane *wp, struct screen_write_ctx *ctx, u_int py) { *************** *** 1092,1098 **** } } ! void window_copy_write_lines(struct window_pane *wp, struct screen_write_ctx *ctx, u_int py, u_int ny) { --- 1098,1104 ---- } } ! static void window_copy_write_lines(struct window_pane *wp, struct screen_write_ctx *ctx, u_int py, u_int ny) { *************** *** 1102,1108 **** window_copy_write_line(wp, ctx, py); } ! void window_copy_redraw_selection(struct window_pane *wp, u_int old_y) { struct window_copy_mode_data *data = wp->modedata; --- 1108,1114 ---- window_copy_write_line(wp, ctx, py); } ! static void window_copy_redraw_selection(struct window_pane *wp, u_int old_y) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1119,1125 **** window_copy_redraw_lines(wp, start, end - start + 1); } ! void window_copy_redraw_lines(struct window_pane *wp, u_int py, u_int ny) { struct window_copy_mode_data *data = wp->modedata; --- 1125,1131 ---- window_copy_redraw_lines(wp, start, end - start + 1); } ! static void window_copy_redraw_lines(struct window_pane *wp, u_int py, u_int ny) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1133,1139 **** screen_write_stop(&ctx); } ! void window_copy_redraw_screen(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; --- 1139,1145 ---- screen_write_stop(&ctx); } ! static void window_copy_redraw_screen(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1141,1147 **** window_copy_redraw_lines(wp, 0, screen_size_y(&data->screen)); } ! void window_copy_update_cursor(struct window_pane *wp, u_int cx, u_int cy) { struct window_copy_mode_data *data = wp->modedata; --- 1147,1153 ---- window_copy_redraw_lines(wp, 0, screen_size_y(&data->screen)); } ! static void window_copy_update_cursor(struct window_pane *wp, u_int cx, u_int cy) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1162,1168 **** } } ! void window_copy_start_selection(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; --- 1168,1174 ---- } } ! static void window_copy_start_selection(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1175,1181 **** window_copy_update_selection(wp, 1); } ! int window_copy_update_selection(struct window_pane *wp, int may_redraw) { struct window_copy_mode_data *data = wp->modedata; --- 1181,1187 ---- window_copy_update_selection(wp, 1); } ! static int window_copy_update_selection(struct window_pane *wp, int may_redraw) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1227,1233 **** return (1); } ! void * window_copy_get_selection(struct window_pane *wp, size_t *len) { struct window_copy_mode_data *data = wp->modedata; --- 1233,1239 ---- return (1); } ! static void * window_copy_get_selection(struct window_pane *wp, size_t *len) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1333,1339 **** return (buf); } ! void window_copy_copy_buffer(struct window_pane *wp, const char *bufname, void *buf, size_t len) { --- 1339,1345 ---- return (buf); } ! static void window_copy_copy_buffer(struct window_pane *wp, const char *bufname, void *buf, size_t len) { *************** *** 1349,1355 **** free(buf); } ! void window_copy_copy_pipe(struct window_pane *wp, struct session *sess, const char *bufname, const char *arg) { --- 1355,1361 ---- free(buf); } ! static void window_copy_copy_pipe(struct window_pane *wp, struct session *sess, const char *bufname, const char *arg) { *************** *** 1376,1382 **** window_copy_copy_buffer(wp, bufname, buf, len); } ! void window_copy_copy_selection(struct window_pane *wp, const char *bufname) { void *buf; --- 1382,1388 ---- window_copy_copy_buffer(wp, bufname, buf, len); } ! static void window_copy_copy_selection(struct window_pane *wp, const char *bufname) { void *buf; *************** *** 1389,1395 **** window_copy_copy_buffer(wp, bufname, buf, len); } ! void window_copy_append_selection(struct window_pane *wp, const char *bufname) { char *buf; --- 1395,1401 ---- window_copy_copy_buffer(wp, bufname, buf, len); } ! static void window_copy_append_selection(struct window_pane *wp, const char *bufname) { char *buf; *************** *** 1423,1429 **** free(buf); } ! void window_copy_copy_line(struct window_pane *wp, char **buf, size_t *off, u_int sy, u_int sx, u_int ex) { --- 1429,1435 ---- free(buf); } ! static void window_copy_copy_line(struct window_pane *wp, char **buf, size_t *off, u_int sy, u_int sx, u_int ex) { *************** *** 1483,1489 **** } } ! void window_copy_clear_selection(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; --- 1489,1495 ---- } } ! static void window_copy_clear_selection(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1497,1503 **** window_copy_update_cursor(wp, px, data->cy); } ! int window_copy_in_set(struct window_pane *wp, u_int px, u_int py, const char *set) { struct window_copy_mode_data *data = wp->modedata; --- 1503,1509 ---- window_copy_update_cursor(wp, px, data->cy); } ! static int window_copy_in_set(struct window_pane *wp, u_int px, u_int py, const char *set) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1514,1520 **** return (strchr(set, *ud->data) != NULL); } ! u_int window_copy_find_length(struct window_pane *wp, u_int py) { struct window_copy_mode_data *data = wp->modedata; --- 1520,1526 ---- return (strchr(set, *ud->data) != NULL); } ! static u_int window_copy_find_length(struct window_pane *wp, u_int py) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1540,1546 **** return (px); } ! void window_copy_cursor_start_of_line(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; --- 1546,1552 ---- return (px); } ! static void window_copy_cursor_start_of_line(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1562,1568 **** window_copy_redraw_lines(wp, data->cy, 1); } ! void window_copy_cursor_back_to_indentation(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; --- 1568,1574 ---- window_copy_redraw_lines(wp, data->cy, 1); } ! static void window_copy_cursor_back_to_indentation(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1585,1591 **** window_copy_redraw_lines(wp, data->cy, 1); } ! void window_copy_cursor_end_of_line(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; --- 1591,1597 ---- window_copy_redraw_lines(wp, data->cy, 1); } ! static void window_copy_cursor_end_of_line(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1616,1622 **** window_copy_redraw_lines(wp, data->cy, 1); } ! void window_copy_other_end(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; --- 1622,1628 ---- window_copy_redraw_lines(wp, data->cy, 1); } ! static void window_copy_other_end(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1654,1660 **** window_copy_redraw_screen(wp); } ! void window_copy_cursor_left(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; --- 1660,1666 ---- window_copy_redraw_screen(wp); } ! static void window_copy_cursor_left(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1671,1677 **** } } ! void window_copy_cursor_right(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; --- 1677,1683 ---- } } ! static void window_copy_cursor_right(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1695,1701 **** } } ! void window_copy_cursor_up(struct window_pane *wp, int scroll_only) { struct window_copy_mode_data *data = wp->modedata; --- 1701,1707 ---- } } ! static void window_copy_cursor_up(struct window_pane *wp, int scroll_only) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1745,1751 **** window_copy_cursor_start_of_line(wp); } ! void window_copy_cursor_down(struct window_pane *wp, int scroll_only) { struct window_copy_mode_data *data = wp->modedata; --- 1751,1757 ---- window_copy_cursor_start_of_line(wp); } ! static void window_copy_cursor_down(struct window_pane *wp, int scroll_only) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1787,1793 **** window_copy_cursor_start_of_line(wp); } ! void window_copy_cursor_jump(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; --- 1793,1799 ---- window_copy_cursor_start_of_line(wp); } ! static void window_copy_cursor_jump(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1812,1818 **** } } ! void window_copy_cursor_jump_back(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; --- 1818,1824 ---- } } ! static void window_copy_cursor_jump_back(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1841,1847 **** } } ! void window_copy_cursor_jump_to(struct window_pane *wp, int jump_again) { struct window_copy_mode_data *data = wp->modedata; --- 1847,1853 ---- } } ! static void window_copy_cursor_jump_to(struct window_pane *wp, int jump_again) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1866,1872 **** } } ! void window_copy_cursor_jump_to_back(struct window_pane *wp, int jump_again) { struct window_copy_mode_data *data = wp->modedata; --- 1872,1878 ---- } } ! static void window_copy_cursor_jump_to_back(struct window_pane *wp, int jump_again) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1898,1904 **** } } ! void window_copy_cursor_next_word(struct window_pane *wp, const char *separators) { struct window_copy_mode_data *data = wp->modedata; --- 1904,1910 ---- } } ! static void window_copy_cursor_next_word(struct window_pane *wp, const char *separators) { struct window_copy_mode_data *data = wp->modedata; *************** *** 1940,1946 **** window_copy_redraw_lines(wp, data->cy, 1); } ! void window_copy_cursor_next_word_end(struct window_pane *wp, const char *separators) { --- 1946,1952 ---- window_copy_redraw_lines(wp, data->cy, 1); } ! static void window_copy_cursor_next_word_end(struct window_pane *wp, const char *separators) { *************** *** 1992,1998 **** } /* Move to the previous place where a word begins. */ ! void window_copy_cursor_previous_word(struct window_pane *wp, const char *separators) { --- 1998,2004 ---- } /* Move to the previous place where a word begins. */ ! static void window_copy_cursor_previous_word(struct window_pane *wp, const char *separators) { *************** *** 2030,2036 **** window_copy_redraw_lines(wp, data->cy, 1); } ! void window_copy_scroll_up(struct window_pane *wp, u_int ny) { struct window_copy_mode_data *data = wp->modedata; --- 2036,2042 ---- window_copy_redraw_lines(wp, data->cy, 1); } ! static void window_copy_scroll_up(struct window_pane *wp, u_int ny) { struct window_copy_mode_data *data = wp->modedata; *************** *** 2060,2066 **** screen_write_stop(&ctx); } ! void window_copy_scroll_down(struct window_pane *wp, u_int ny) { struct window_copy_mode_data *data = wp->modedata; --- 2066,2072 ---- screen_write_stop(&ctx); } ! static void window_copy_scroll_down(struct window_pane *wp, u_int ny) { struct window_copy_mode_data *data = wp->modedata; *************** *** 2100,2106 **** return (data->oy); } ! void window_copy_rectangle_toggle(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; --- 2106,2112 ---- return (data->oy); } ! static void window_copy_rectangle_toggle(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; *************** *** 2117,2123 **** window_copy_redraw_screen(wp); } ! void window_copy_move_mouse(struct mouse_event *m) { struct window_pane *wp; --- 2123,2129 ---- window_copy_redraw_screen(wp); } ! static void window_copy_move_mouse(struct mouse_event *m) { struct window_pane *wp; *************** *** 2157,2163 **** window_copy_redraw_screen(wp); } ! void window_copy_drag_update(__unused struct client *c, struct mouse_event *m) { struct window_pane *wp; --- 2163,2169 ---- window_copy_redraw_screen(wp); } ! static void window_copy_drag_update(__unused struct client *c, struct mouse_event *m) { struct window_pane *wp;