~ubuntu-branches/ubuntu/utopic/rxvt-unicode/utopic

« back to all changes in this revision

Viewing changes to src/command.C

  • Committer: Package Import Robot
  • Author(s): Ryan Kavanagh, Ryan Kavanagh, James M Leddy
  • Date: 2013-12-21 16:17:07 UTC
  • mfrom: (1.1.24)
  • Revision ID: package-import@ubuntu.com-20131221161707-898w5z8uls5mr4jw
Tags: 9.19-1
[ Ryan Kavanagh ]
* Imported Upstream version 9.19 (Closes: #731334)
* Drop the following patches, applied upstream:
  + 13_section_mismatch.diff
  + 14_pod_errors.diff
  + 15_perl_518.diff
* Update standards version to 3.9.5
* Offer both 16x16 and 32x32 icons in menu (Closes: #723889)
* Allow urxvt and urxvtd to update utmp (Closes: #500230)
  + Override lintian warning setgid-binary for /usr/bin/urxvt and
    /usr/bin/urxvtd

[ James M Leddy ]
* Added .desktop files so that we work with window managers like Gnome and
  Unity (Closes: #724623)

Show diffs side-by-side

added added

removed removed

Lines of Context:
512
512
 
513
513
              if (keysym == XK_Prior)
514
514
                {
515
 
                  scr_page (UP, lnsppg);
 
515
                  scr_page (lnsppg);
516
516
                  return;
517
517
                }
518
518
              else if (keysym == XK_Next)
519
519
                {
520
 
                  scr_page (DN, lnsppg);
 
520
                  scr_page (-lnsppg);
521
521
                  return;
522
522
                }
523
523
            }
526
526
            {
527
527
              if (keysym == XK_Up)
528
528
                {
529
 
                  scr_page (UP, 1);
 
529
                  scr_page (1);
530
530
                  return;
531
531
                }
532
532
              else if (keysym == XK_Down)
533
533
                {
534
 
                  scr_page (DN, 1);
 
534
                  scr_page (-1);
535
535
                  return;
536
536
                }
537
537
            }
541
541
            {
542
542
              if (keysym == XK_Home)
543
543
                {
544
 
                  scr_move_to (0, 1);
 
544
                  scr_changeview (top_row);
545
545
                  return;
546
546
                }
547
547
              else if (keysym == XK_End)
548
548
                {
549
 
                  scr_move_to (1, 1);
 
549
                  scr_changeview (0);
550
550
                  return;
551
551
                }
552
552
            }
1079
1079
void
1080
1080
rxvt_term::sel_scroll_cb (ev::timer &w, int revents)
1081
1081
{
1082
 
  if (scr_page (scroll_selection_dir, scroll_selection_lines))
 
1082
  if (scr_page (scroll_selection_lines))
1083
1083
    {
1084
1084
      selection_extend (selection_save_x, selection_save_y, selection_save_state);
1085
1085
      want_refresh = 1;
1094
1094
void
1095
1095
rxvt_term::slip_wheel_cb (ev::timer &w, int revents)
1096
1096
{
1097
 
  if (scr_changeview (view_start - mouse_slip_wheel_speed))
 
1097
  if (scr_page (mouse_slip_wheel_speed))
1098
1098
    {
1099
1099
      want_refresh = 1;
1100
1100
      refresh_check ();
1640
1640
                    if (ev.xbutton.y < int_bwidth
1641
1641
                        || Pixel2Row (ev.xbutton.y) > (nrow-1))
1642
1642
                      {
 
1643
                        page_dirn scroll_selection_dir;
1643
1644
                        int dist;
1644
1645
 
1645
1646
                        /* don't clobber the current delay if we are
1672
1673
                                                 + 1;
1673
1674
                        min_it (scroll_selection_lines,
1674
1675
                                SELECTION_SCROLL_MAX_LINES);
 
1676
                        scroll_selection_lines *= scroll_selection_dir;
1675
1677
                      }
1676
1678
                    else
1677
1679
                      {
2197
2199
          case Button4:
2198
2200
          case Button5:
2199
2201
            {
2200
 
              int i;
2201
 
              page_dirn v;
 
2202
              int lines;
 
2203
              page_dirn dirn;
2202
2204
 
2203
 
              v = ev.button == Button4 ? UP : DN;
 
2205
              dirn = ev.button == Button4 ? UP : DN;
2204
2206
 
2205
2207
              if (ev.state & ShiftMask)
2206
 
                i = 1;
 
2208
                lines = 1;
2207
2209
              else if (option (Opt_mouseWheelScrollPage))
2208
 
                i = nrow - 1;
 
2210
                lines = nrow - 1;
2209
2211
              else
2210
 
                i = 5;
 
2212
                lines = 5;
2211
2213
 
2212
2214
# ifdef MOUSE_SLIP_WHEELING
2213
2215
              if (ev.state & ControlMask)
2214
2216
                {
2215
 
                  mouse_slip_wheel_speed += v ? -1 : 1;
2216
 
                  if (mouse_slip_wheel_speed < -nrow) mouse_slip_wheel_speed = -nrow;
2217
 
                  if (mouse_slip_wheel_speed > +nrow) mouse_slip_wheel_speed = +nrow;
 
2217
                  mouse_slip_wheel_speed += dirn;
 
2218
                  clamp_it (mouse_slip_wheel_speed, -nrow, nrow);
2218
2219
 
2219
2220
                  if (!slip_wheel_ev.is_active ())
2220
2221
                    slip_wheel_ev.start (SCROLLBAR_CONTINUOUS_DELAY, SCROLLBAR_CONTINUOUS_DELAY);
2222
2223
              else
2223
2224
# endif
2224
2225
                {
2225
 
                  scr_page (v, i);
 
2226
                  scr_page (dirn, lines);
2226
2227
                  scrollBar.show (1);
2227
2228
                }
2228
2229
            }
2801
2802
void ecb_hot
2802
2803
rxvt_term::process_csi_seq ()
2803
2804
{
2804
 
  unicode_t ch, priv, i;
 
2805
  unicode_t ch, priv, prev_ch, i;
2805
2806
  unsigned int nargs, p;
2806
2807
  int n, ndef;
2807
2808
  int arg[ESC_ARGS] = { };
2817
2818
      ch = cmd_getc ();
2818
2819
    }
2819
2820
 
 
2821
  prev_ch = 0;
2820
2822
  /* read any numerical arguments */
2821
2823
  for (n = -1; ch < CSI_ICH; )
2822
2824
    {
2836
2838
      else if (IS_CONTROL (ch))
2837
2839
        process_nonprinting (ch);
2838
2840
 
 
2841
      prev_ch = ch;
2839
2842
      ch = cmd_getc ();
2840
2843
    }
2841
2844
 
3079
3082
          priv_modes |= PrivMode_LFNL;
3080
3083
        break;
3081
3084
 
 
3085
      case CSI_71:              // DESCUSR: set cursor style
 
3086
        if (prev_ch == ' ')
 
3087
          set_cursor_style (arg[0]);
 
3088
        break;
 
3089
 
3082
3090
        /*
3083
3091
         * PRIVATE USE beyond this point.  All CSI_7? sequences here
3084
3092
         */
3993
4001
        }
3994
4002
    }
3995
4003
}
 
4004
 
 
4005
void
 
4006
rxvt_term::set_cursor_style (int style)
 
4007
{
 
4008
  if (!IN_RANGE_INC (style, 0, 4))
 
4009
    return;
 
4010
 
 
4011
  set_option (Opt_cursorUnderline, style >= 3);
 
4012
 
 
4013
#ifdef CURSOR_BLINK
 
4014
  set_option (Opt_cursorBlink, !style || (style & 1));
 
4015
  cursor_blink_reset ();
 
4016
#endif
 
4017
 
 
4018
  want_refresh = 1;
 
4019
}
3996
4020
/*}}} */
3997
4021
 
3998
4022
/* ------------------------------------------------------------------------- */