[BACK]Return to window-copy.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/window-copy.c between version 1.135 and 1.136

version 1.135, 2015/10/23 16:02:21 version 1.136, 2015/10/27 15:58:43
Line 195 
Line 195 
         s = &data->screen;          s = &data->screen;
         screen_init(s, screen_size_x(&wp->base), screen_size_y(&wp->base), 0);          screen_init(s, screen_size_x(&wp->base), screen_size_y(&wp->base), 0);
   
         keys = options_get_number(&wp->window->options, "mode-keys");          keys = options_get_number(wp->window->options, "mode-keys");
         if (keys == MODEKEY_EMACS)          if (keys == MODEKEY_EMACS)
                 mode_key_init(&data->mdata, &mode_key_tree_emacs_copy);                  mode_key_init(&data->mdata, &mode_key_tree_emacs_copy);
         else          else
Line 286 
Line 286 
         if (backing == &wp->base)          if (backing == &wp->base)
                 return;                  return;
   
         utf8flag = options_get_number(&wp->window->options, "utf8");          utf8flag = options_get_number(wp->window->options, "utf8");
         memcpy(&gc, &grid_default_cell, sizeof gc);          memcpy(&gc, &grid_default_cell, sizeof gc);
   
         old_hsize = screen_hsize(data->backing);          old_hsize = screen_hsize(data->backing);
Line 629 
Line 629 
                 break;                  break;
         case MODEKEYCOPY_NEXTWORD:          case MODEKEYCOPY_NEXTWORD:
                 word_separators =                  word_separators =
                     options_get_string(&sess->options, "word-separators");                      options_get_string(sess->options, "word-separators");
                 for (; np != 0; np--)                  for (; np != 0; np--)
                         window_copy_cursor_next_word(wp, word_separators);                          window_copy_cursor_next_word(wp, word_separators);
                 break;                  break;
         case MODEKEYCOPY_NEXTWORDEND:          case MODEKEYCOPY_NEXTWORDEND:
                 word_separators =                  word_separators =
                     options_get_string(&sess->options, "word-separators");                      options_get_string(sess->options, "word-separators");
                 for (; np != 0; np--)                  for (; np != 0; np--)
                         window_copy_cursor_next_word_end(wp, word_separators);                          window_copy_cursor_next_word_end(wp, word_separators);
                 break;                  break;
Line 645 
Line 645 
                 break;                  break;
         case MODEKEYCOPY_PREVIOUSWORD:          case MODEKEYCOPY_PREVIOUSWORD:
                 word_separators =                  word_separators =
                     options_get_string(&sess->options, "word-separators");                      options_get_string(sess->options, "word-separators");
                 for (; np != 0; np--)                  for (; np != 0; np--)
                         window_copy_cursor_previous_word(wp, word_separators);                          window_copy_cursor_previous_word(wp, word_separators);
                 break;                  break;
Line 777 
Line 777 
         return;          return;
   
 input_on:  input_on:
         keys = options_get_number(&wp->window->options, "mode-keys");          keys = options_get_number(wp->window->options, "mode-keys");
         if (keys == MODEKEY_EMACS)          if (keys == MODEKEY_EMACS)
                 mode_key_init(&data->mdata, &mode_key_tree_emacs_edit);                  mode_key_init(&data->mdata, &mode_key_tree_emacs_edit);
         else          else
Line 787 
Line 787 
         return;          return;
   
 input_off:  input_off:
         keys = options_get_number(&wp->window->options, "mode-keys");          keys = options_get_number(wp->window->options, "mode-keys");
         if (keys == MODEKEY_EMACS)          if (keys == MODEKEY_EMACS)
                 mode_key_init(&data->mdata, &mode_key_tree_emacs_copy);                  mode_key_init(&data->mdata, &mode_key_tree_emacs_copy);
         else          else
Line 1026 
Line 1026 
   
         if (*searchstr == '\0')          if (*searchstr == '\0')
                 return;                  return;
         utf8flag = options_get_number(&wp->window->options, "utf8");          utf8flag = options_get_number(wp->window->options, "utf8");
         wrapflag = options_get_number(&wp->window->options, "wrap-search");          wrapflag = options_get_number(wp->window->options, "wrap-search");
         searchlen = screen_write_strlen(utf8flag, "%s", searchstr);          searchlen = screen_write_strlen(utf8flag, "%s", searchstr);
   
         screen_init(&ss, searchlen, 1, 0);          screen_init(&ss, searchlen, 1, 0);
Line 1093 
Line 1093 
   
         if (*searchstr == '\0')          if (*searchstr == '\0')
                 return;                  return;
         utf8flag = options_get_number(&wp->window->options, "utf8");          utf8flag = options_get_number(wp->window->options, "utf8");
         wrapflag = options_get_number(&wp->window->options, "wrap-search");          wrapflag = options_get_number(wp->window->options, "wrap-search");
         searchlen = screen_write_strlen(utf8flag, "%s", searchstr);          searchlen = screen_write_strlen(utf8flag, "%s", searchstr);
   
         screen_init(&ss, searchlen, 1, 0);          screen_init(&ss, searchlen, 1, 0);
Line 1168 
Line 1168 
 {  {
         struct window_copy_mode_data    *data = wp->modedata;          struct window_copy_mode_data    *data = wp->modedata;
         struct screen                   *s = &data->screen;          struct screen                   *s = &data->screen;
         struct options                  *oo = &wp->window->options;          struct options                  *oo = wp->window->options;
         struct grid_cell                 gc;          struct grid_cell                 gc;
         char                             hdr[512];          char                             hdr[512];
         size_t                           last, xoff = 0, size = 0, limit;          size_t                           last, xoff = 0, size = 0, limit;
Line 1301 
Line 1301 
 {  {
         struct window_copy_mode_data    *data = wp->modedata;          struct window_copy_mode_data    *data = wp->modedata;
         struct screen                   *s = &data->screen;          struct screen                   *s = &data->screen;
         struct options                  *oo = &wp->window->options;          struct options                  *oo = wp->window->options;
         struct grid_cell                 gc;          struct grid_cell                 gc;
         u_int                            sx, sy, ty, cy;          u_int                            sx, sy, ty, cy;
   
Line 1401 
Line 1401 
          * bottom-right-most, regardless of copy direction. If it is vi, also           * bottom-right-most, regardless of copy direction. If it is vi, also
          * keep bottom-right-most character.           * keep bottom-right-most character.
          */           */
         keys = options_get_number(&wp->window->options, "mode-keys");          keys = options_get_number(wp->window->options, "mode-keys");
         if (data->rectflag) {          if (data->rectflag) {
                 /*                  /*
                  * Need to ignore the column with the cursor in it, which for                   * Need to ignore the column with the cursor in it, which for
Line 1460 
Line 1460 
 {  {
         struct screen_write_ctx ctx;          struct screen_write_ctx ctx;
   
         if (options_get_number(&global_options, "set-clipboard")) {          if (options_get_number(global_options, "set-clipboard")) {
                 screen_write_start(&ctx, wp, NULL);                  screen_write_start(&ctx, wp, NULL);
                 screen_write_setselection(&ctx, buf, len);                  screen_write_setselection(&ctx, buf, len);
                 screen_write_stop(&ctx);                  screen_write_stop(&ctx);
Line 1523 
Line 1523 
         if (buf == NULL)          if (buf == NULL)
                 return;                  return;
   
         if (options_get_number(&global_options, "set-clipboard")) {          if (options_get_number(global_options, "set-clipboard")) {
                 screen_write_start(&ctx, wp, NULL);                  screen_write_start(&ctx, wp, NULL);
                 screen_write_setselection(&ctx, buf, len);                  screen_write_setselection(&ctx, buf, len);
                 screen_write_stop(&ctx);                  screen_write_stop(&ctx);
Line 2074 
Line 2074 
     const char *separators)      const char *separators)
 {  {
         struct window_copy_mode_data    *data = wp->modedata;          struct window_copy_mode_data    *data = wp->modedata;
         struct options                  *oo = &wp->window->options;          struct options                  *oo = wp->window->options;
         struct screen                   *back_s = data->backing;          struct screen                   *back_s = data->backing;
         u_int                            px, py, xx, yy;          u_int                            px, py, xx, yy;
         int                              keys, expected = 1;          int                              keys, expected = 1;

Legend:
Removed from v.1.135  
changed lines
  Added in v.1.136