--- rxvt-unicode/src/command.C 2006/01/13 15:42:50 1.261 +++ rxvt-unicode/src/command.C 2006/01/16 06:37:51 1.264 @@ -149,7 +149,7 @@ for (;;) { - const line_t &l = ROW(y - view_start); + const line_t &l = ROW(y + view_start); text_t t = l.t[x]; @@ -445,7 +445,7 @@ } else if (keysym == XK_End) { - scr_move_to (1, 0); + scr_move_to (1, 1); return; } } @@ -974,10 +974,10 @@ { if (SHOULD_INVOKE (HOOK_LINE_UPDATE)) { - int row = -view_start; + int row = view_start; int end_row = row + nrow; - while (row > -nsaved && ROW (row - 1).is_longer ()) + while (row > top_row && ROW (row - 1).is_longer ()) --row; do @@ -1023,8 +1023,7 @@ void rxvt_term::check_cb (check_watcher &w) { - SET_R (this); - SET_LOCALE (locale); + make_current (); display->flush (); @@ -1035,8 +1034,7 @@ void rxvt_term::flush_cb (time_watcher &w) { - SET_R (this); - SET_LOCALE (locale); + make_current (); refresh_limit = 1; refresh_count = 0; @@ -1103,8 +1101,7 @@ || mouse_slip_wheel_speed < 0 ? scr_page (DN, -mouse_slip_wheel_speed) : scr_page (UP, mouse_slip_wheel_speed)) { - if (view_start == nsaved || - view_start == 0) + if (view_start == top_row || view_start == 0) mouse_slip_wheel_speed = 0; refresh_type |= SMOOTH_REFRESH; @@ -1175,8 +1172,7 @@ void rxvt_term::pty_cb (io_watcher &w, short revents) { - SET_R (this); - SET_LOCALE (locale); + make_current (); if (revents & EVENT_READ) // loop, but don't allow a single term to monopolize us @@ -1218,8 +1214,7 @@ void rxvt_term::pointer_cb (time_watcher &w) { - SET_R (this); - SET_LOCALE (locale); + make_current (); pointer_blank (); } @@ -1308,10 +1303,9 @@ void rxvt_term::x_cb (XEvent &ev) { - dDisp; + make_current (); - SET_R (this); - SET_LOCALE (locale); + dDisp; if (ev.xany.window == vt && HOOK_INVOKE ((this, HOOK_X_EVENT, DT_XEVENT, &ev, DT_END))) @@ -1825,8 +1819,7 @@ void rxvt_term::rootwin_cb (XEvent &ev) { - SET_R (this); - SET_LOCALE (locale); + make_current (); switch (ev.type) {