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

Comparing rxvt-unicode/src/screen.C (file contents):
Revision 1.443 by sf-exg, Sun Mar 31 22:31:45 2013 UTC vs.
Revision 1.446 by root, Thu May 22 18:54:33 2014 UTC

5 * Copyright (c) 1997-2001 Geoff Wing <gcw@pobox.com> 5 * Copyright (c) 1997-2001 Geoff Wing <gcw@pobox.com>
6 * Copyright (c) 2003-2007 Marc Lehmann <schmorp@schmorp.de> 6 * Copyright (c) 2003-2007 Marc Lehmann <schmorp@schmorp.de>
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version. 11 * (at your option) any later version.
12 * 12 *
13 * This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1897 * the top of the screen 1897 * the top of the screen
1898 */ 1898 */
1899void 1899void
1900rxvt_term::scr_move_to (int y, int len) NOTHROW 1900rxvt_term::scr_move_to (int y, int len) NOTHROW
1901{ 1901{
1902 scr_changeview ((top_row - nrow) * (len - y) / len + (nrow - 1)); 1902 // lerp (y, 0, len, top_row, nrow - 1)
1903 scr_changeview (top_row + (nrow - 1 - top_row) * y / len);
1903} 1904}
1904 1905
1905/* ------------------------------------------------------------------------- */ 1906/* ------------------------------------------------------------------------- */
1906/* 1907/*
1907 * Page the screen up/down nlines 1908 * Page the screen up/down nlines
2678 2679
2679void 2680void
2680rxvt_term::selection_changed () NOTHROW 2681rxvt_term::selection_changed () NOTHROW
2681{ 2682{
2682 line_t &r1 = ROW (selection.beg.row); 2683 line_t &r1 = ROW (selection.beg.row);
2683 while (selection.beg.col > 0 && r1.t [selection.beg.col] == NOCHAR) 2684 while (selection.beg.col < r1.l && r1.t [selection.beg.col] == NOCHAR)
2684 --selection.beg.col; 2685 ++selection.beg.col;
2685 2686
2686 line_t &r2 = ROW (selection.end.row); 2687 line_t &r2 = ROW (selection.end.row);
2687 while (selection.end.col < r2.l && r2.t [selection.end.col] == NOCHAR) 2688 while (selection.end.col < r2.l && r2.t [selection.end.col] == NOCHAR)
2688 ++selection.end.col; 2689 ++selection.end.col;
2689 2690

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines