mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-19 03:58:05 -05:00
Yet another pedantic fix for scroll margin setting :-)
[originally from svn r586]
This commit is contained in:
parent
ff9c336662
commit
bed673083b
19
terminal.c
19
terminal.c
@ -1221,20 +1221,15 @@ static int beep_overload = 0;
|
|||||||
compatibility(VT100);
|
compatibility(VT100);
|
||||||
if (esc_nargs <= 2) {
|
if (esc_nargs <= 2) {
|
||||||
int top, bot;
|
int top, bot;
|
||||||
/* VTTEST Bug 9 if the first arg is default _or_ zero
|
top = def(esc_args[0], 1) - 1;
|
||||||
* this is a full screen region irrespective of 2nd arg.
|
bot = (esc_nargs <= 1 || esc_args[1] == 0 ? rows :
|
||||||
*/
|
def(esc_args[1], rows)) - 1;
|
||||||
if (esc_args[0] <= 0) {
|
|
||||||
top=0;
|
|
||||||
bot=rows-1;
|
|
||||||
} else {
|
|
||||||
top = def(esc_args[0], 1) - 1;
|
|
||||||
bot = (esc_nargs <= 1 || esc_args[1] == 0 ? rows :
|
|
||||||
def(esc_args[1], rows)) - 1;
|
|
||||||
}
|
|
||||||
if (bot >= rows)
|
if (bot >= rows)
|
||||||
bot = rows-1;
|
bot = rows-1;
|
||||||
if (top <= bot) {
|
/* VTTEST Bug 9 - if region is less than 2 lines
|
||||||
|
* don't change region.
|
||||||
|
*/
|
||||||
|
if (bot-top > 1) {
|
||||||
marg_t = top;
|
marg_t = top;
|
||||||
marg_b = bot;
|
marg_b = bot;
|
||||||
curs_x = 0;
|
curs_x = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user