ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.539 by sf-exg, Tue Apr 16 08:44:45 2013 UTC vs.
Revision 1.541 by root, Thu Feb 20 18:59:13 2014 UTC

1077 1077
1078#ifdef SELECTION_SCROLLING 1078#ifdef SELECTION_SCROLLING
1079void 1079void
1080rxvt_term::sel_scroll_cb (ev::timer &w, int revents) 1080rxvt_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 selection_extend (selection_save_x, selection_save_y, selection_save_state); 1084 selection_extend (selection_save_x, selection_save_y, selection_save_state);
1085 want_refresh = 1; 1085 want_refresh = 1;
1086 refresh_check (); 1086 refresh_check ();
1087 } 1087 }
1638 1638
1639#ifdef SELECTION_SCROLLING 1639#ifdef SELECTION_SCROLLING
1640 if (ev.xbutton.y < int_bwidth 1640 if (ev.xbutton.y < int_bwidth
1641 || Pixel2Row (ev.xbutton.y) > (nrow-1)) 1641 || Pixel2Row (ev.xbutton.y) > (nrow-1))
1642 { 1642 {
1643 page_dirn scroll_selection_dir;
1643 int dist; 1644 int dist;
1644 1645
1645 /* don't clobber the current delay if we are 1646 /* don't clobber the current delay if we are
1646 * already in the middle of scrolling. 1647 * already in the middle of scrolling.
1647 */ 1648 */
1670 scroll_selection_lines = Pixel2Height (dist) 1671 scroll_selection_lines = Pixel2Height (dist)
1671 / SELECTION_SCROLL_LINE_SPEEDUP 1672 / SELECTION_SCROLL_LINE_SPEEDUP
1672 + 1; 1673 + 1;
1673 min_it (scroll_selection_lines, 1674 min_it (scroll_selection_lines,
1674 SELECTION_SCROLL_MAX_LINES); 1675 SELECTION_SCROLL_MAX_LINES);
1676 scroll_selection_lines *= scroll_selection_dir;
1675 } 1677 }
1676 else 1678 else
1677 { 1679 {
1678 /* we are within the text window, so we 1680 /* we are within the text window, so we
1679 * shouldn't be scrolling 1681 * shouldn't be scrolling
3225rxvt_term::get_to_st (unicode_t &ends_how) 3227rxvt_term::get_to_st (unicode_t &ends_how)
3226{ 3228{
3227 unicode_t ch; 3229 unicode_t ch;
3228 bool seen_esc = false; 3230 bool seen_esc = false;
3229 unsigned int n = 0; 3231 unsigned int n = 0;
3230 wchar_t string[STRING_MAX]; 3232 wchar_t string[CBUFSIZ];
3231 3233
3232 while ((ch = cmd_getc ()) != NOCHAR) 3234 while ((ch = cmd_getc ()) != NOCHAR)
3233 { 3235 {
3234 if (seen_esc) 3236 if (seen_esc)
3235 { 3237 {
3250 else if (ch < 0x20) 3252 else if (ch < 0x20)
3251 return NULL; /* other control character - exit */ 3253 return NULL; /* other control character - exit */
3252 3254
3253 seen_esc = false; 3255 seen_esc = false;
3254 3256
3255 if (n >= STRING_MAX - 1) 3257 if (n >= sizeof (string) - 1)
3256 // stop at some sane length 3258 // stop at some sane length
3257 return NULL; 3259 return NULL;
3258 3260
3259 string[n++] = ch; 3261 string[n++] = ch;
3260 } 3262 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines