requires fix_cpos() to be called after it (otherwise cpos might point
to a line that isn't where you remember it being), and a mis-aimed
incpos() was causing forward selection dragging not to include the
char under the mouse. Both fixed.
git-svn-id: svn://svn.tartarus.org/sgt/putty@1063
cda61777-01e9-0310-a592-
d414129be87e
* Scroll the screen. (`lines' is +ve for scrolling forward, -ve
* for backward.) `sb' is TRUE if the scrolling is permitted to
* affect the scrollback buffer.
* Scroll the screen. (`lines' is +ve for scrolling forward, -ve
* for backward.) `sb' is TRUE if the scrolling is permitted to
* affect the scrollback buffer.
+ *
+ * NB this function invalidates all pointers into lines of the
+ * screen data structures. In particular, you MUST call fix_cpos
+ * after calling scroll() and before doing anything else that
+ * uses the cpos shortcut pointer.
*/
static void scroll (int topline, int botline, int lines, int sb) {
unsigned long *line, *line2;
*/
static void scroll (int topline, int botline, int lines, int sb) {
unsigned long *line, *line2;
compatibility(VT102);
if (curs.y <= marg_b)
scroll (curs.y, marg_b, -def(esc_args[0], 1), FALSE);
compatibility(VT102);
if (curs.y <= marg_b)
scroll (curs.y, marg_b, -def(esc_args[0], 1), FALSE);
seen_disp_event = TRUE;
break;
case 'M': /* delete lines */
compatibility(VT102);
if (curs.y <= marg_b)
scroll (curs.y, marg_b, def(esc_args[0], 1), TRUE);
seen_disp_event = TRUE;
break;
case 'M': /* delete lines */
compatibility(VT102);
if (curs.y <= marg_b)
scroll (curs.y, marg_b, def(esc_args[0], 1), TRUE);
seen_disp_event = TRUE;
break;
case '@': /* insert chars */
seen_disp_event = TRUE;
break;
case '@': /* insert chars */
} else {
selstart = selanchor;
selend = selpoint;
} else {
selstart = selanchor;
selend = selpoint;
}
sel_spread();
} else if ((b == MB_SELECT || b == MB_EXTEND) && a == MA_RELEASE) {
}
sel_spread();
} else if ((b == MB_SELECT || b == MB_EXTEND) && a == MA_RELEASE) {