=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/window-copy.c,v retrieving revision 1.135 retrieving revision 1.136 diff -c -r1.135 -r1.136 *** src/usr.bin/tmux/window-copy.c 2015/10/23 16:02:21 1.135 --- src/usr.bin/tmux/window-copy.c 2015/10/27 15:58:43 1.136 *************** *** 1,4 **** ! /* $OpenBSD: window-copy.c,v 1.135 2015/10/23 16:02:21 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: window-copy.c,v 1.136 2015/10/27 15:58:43 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 195,201 **** s = &data->screen; screen_init(s, screen_size_x(&wp->base), screen_size_y(&wp->base), 0); ! keys = options_get_number(&wp->window->options, "mode-keys"); if (keys == MODEKEY_EMACS) mode_key_init(&data->mdata, &mode_key_tree_emacs_copy); else --- 195,201 ---- s = &data->screen; screen_init(s, screen_size_x(&wp->base), screen_size_y(&wp->base), 0); ! keys = options_get_number(wp->window->options, "mode-keys"); if (keys == MODEKEY_EMACS) mode_key_init(&data->mdata, &mode_key_tree_emacs_copy); else *************** *** 286,292 **** if (backing == &wp->base) return; ! utf8flag = options_get_number(&wp->window->options, "utf8"); memcpy(&gc, &grid_default_cell, sizeof gc); old_hsize = screen_hsize(data->backing); --- 286,292 ---- if (backing == &wp->base) return; ! utf8flag = options_get_number(wp->window->options, "utf8"); memcpy(&gc, &grid_default_cell, sizeof gc); old_hsize = screen_hsize(data->backing); *************** *** 629,641 **** break; case MODEKEYCOPY_NEXTWORD: word_separators = ! options_get_string(&sess->options, "word-separators"); for (; np != 0; np--) window_copy_cursor_next_word(wp, word_separators); break; case MODEKEYCOPY_NEXTWORDEND: word_separators = ! options_get_string(&sess->options, "word-separators"); for (; np != 0; np--) window_copy_cursor_next_word_end(wp, word_separators); break; --- 629,641 ---- break; case MODEKEYCOPY_NEXTWORD: word_separators = ! options_get_string(sess->options, "word-separators"); for (; np != 0; np--) window_copy_cursor_next_word(wp, word_separators); break; case MODEKEYCOPY_NEXTWORDEND: word_separators = ! options_get_string(sess->options, "word-separators"); for (; np != 0; np--) window_copy_cursor_next_word_end(wp, word_separators); break; *************** *** 645,651 **** break; case MODEKEYCOPY_PREVIOUSWORD: word_separators = ! options_get_string(&sess->options, "word-separators"); for (; np != 0; np--) window_copy_cursor_previous_word(wp, word_separators); break; --- 645,651 ---- break; case MODEKEYCOPY_PREVIOUSWORD: word_separators = ! options_get_string(sess->options, "word-separators"); for (; np != 0; np--) window_copy_cursor_previous_word(wp, word_separators); break; *************** *** 777,783 **** return; input_on: ! keys = options_get_number(&wp->window->options, "mode-keys"); if (keys == MODEKEY_EMACS) mode_key_init(&data->mdata, &mode_key_tree_emacs_edit); else --- 777,783 ---- return; input_on: ! keys = options_get_number(wp->window->options, "mode-keys"); if (keys == MODEKEY_EMACS) mode_key_init(&data->mdata, &mode_key_tree_emacs_edit); else *************** *** 787,793 **** return; input_off: ! keys = options_get_number(&wp->window->options, "mode-keys"); if (keys == MODEKEY_EMACS) mode_key_init(&data->mdata, &mode_key_tree_emacs_copy); else --- 787,793 ---- return; input_off: ! keys = options_get_number(wp->window->options, "mode-keys"); if (keys == MODEKEY_EMACS) mode_key_init(&data->mdata, &mode_key_tree_emacs_copy); else *************** *** 1026,1033 **** if (*searchstr == '\0') return; ! utf8flag = options_get_number(&wp->window->options, "utf8"); ! wrapflag = options_get_number(&wp->window->options, "wrap-search"); searchlen = screen_write_strlen(utf8flag, "%s", searchstr); screen_init(&ss, searchlen, 1, 0); --- 1026,1033 ---- if (*searchstr == '\0') return; ! utf8flag = options_get_number(wp->window->options, "utf8"); ! wrapflag = options_get_number(wp->window->options, "wrap-search"); searchlen = screen_write_strlen(utf8flag, "%s", searchstr); screen_init(&ss, searchlen, 1, 0); *************** *** 1093,1100 **** if (*searchstr == '\0') return; ! utf8flag = options_get_number(&wp->window->options, "utf8"); ! wrapflag = options_get_number(&wp->window->options, "wrap-search"); searchlen = screen_write_strlen(utf8flag, "%s", searchstr); screen_init(&ss, searchlen, 1, 0); --- 1093,1100 ---- if (*searchstr == '\0') return; ! utf8flag = options_get_number(wp->window->options, "utf8"); ! wrapflag = options_get_number(wp->window->options, "wrap-search"); searchlen = screen_write_strlen(utf8flag, "%s", searchstr); screen_init(&ss, searchlen, 1, 0); *************** *** 1168,1174 **** { struct window_copy_mode_data *data = wp->modedata; struct screen *s = &data->screen; ! struct options *oo = &wp->window->options; struct grid_cell gc; char hdr[512]; size_t last, xoff = 0, size = 0, limit; --- 1168,1174 ---- { struct window_copy_mode_data *data = wp->modedata; struct screen *s = &data->screen; ! struct options *oo = wp->window->options; struct grid_cell gc; char hdr[512]; size_t last, xoff = 0, size = 0, limit; *************** *** 1301,1307 **** { struct window_copy_mode_data *data = wp->modedata; struct screen *s = &data->screen; ! struct options *oo = &wp->window->options; struct grid_cell gc; u_int sx, sy, ty, cy; --- 1301,1307 ---- { struct window_copy_mode_data *data = wp->modedata; struct screen *s = &data->screen; ! struct options *oo = wp->window->options; struct grid_cell gc; u_int sx, sy, ty, cy; *************** *** 1401,1407 **** * bottom-right-most, regardless of copy direction. If it is vi, also * keep bottom-right-most character. */ ! keys = options_get_number(&wp->window->options, "mode-keys"); if (data->rectflag) { /* * Need to ignore the column with the cursor in it, which for --- 1401,1407 ---- * bottom-right-most, regardless of copy direction. If it is vi, also * keep bottom-right-most character. */ ! keys = options_get_number(wp->window->options, "mode-keys"); if (data->rectflag) { /* * Need to ignore the column with the cursor in it, which for *************** *** 1460,1466 **** { struct screen_write_ctx ctx; ! if (options_get_number(&global_options, "set-clipboard")) { screen_write_start(&ctx, wp, NULL); screen_write_setselection(&ctx, buf, len); screen_write_stop(&ctx); --- 1460,1466 ---- { struct screen_write_ctx ctx; ! if (options_get_number(global_options, "set-clipboard")) { screen_write_start(&ctx, wp, NULL); screen_write_setselection(&ctx, buf, len); screen_write_stop(&ctx); *************** *** 1523,1529 **** if (buf == NULL) return; ! if (options_get_number(&global_options, "set-clipboard")) { screen_write_start(&ctx, wp, NULL); screen_write_setselection(&ctx, buf, len); screen_write_stop(&ctx); --- 1523,1529 ---- if (buf == NULL) return; ! if (options_get_number(global_options, "set-clipboard")) { screen_write_start(&ctx, wp, NULL); screen_write_setselection(&ctx, buf, len); screen_write_stop(&ctx); *************** *** 2074,2080 **** const char *separators) { struct window_copy_mode_data *data = wp->modedata; ! struct options *oo = &wp->window->options; struct screen *back_s = data->backing; u_int px, py, xx, yy; int keys, expected = 1; --- 2074,2080 ---- const char *separators) { struct window_copy_mode_data *data = wp->modedata; ! struct options *oo = wp->window->options; struct screen *back_s = data->backing; u_int px, py, xx, yy; int keys, expected = 1;