From f1fb0f156883b78a187f4e8d3980f877ef41c0af Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 14 May 2023 20:32:54 +0300 Subject: [PATCH] Autoscale top/bottom off by one fix. --- custom.cpp | 2 +- drawing.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom.cpp b/custom.cpp index daecaa9a..fb5a389c 100644 --- a/custom.cpp +++ b/custom.cpp @@ -12585,7 +12585,7 @@ static void hautoscale_check(void) last_planes_vpos = vpos; } if (vpos >= minfirstline && first_planes_vpos == 0) { - first_planes_vpos = vpos > minfirstline ? vpos - 1 : vpos; + first_planes_vpos = vpos; } else if (vpos >= current_maxvpos() - 1) { last_planes_vpos = current_maxvpos(); } diff --git a/drawing.cpp b/drawing.cpp index e3968aa9..007fcc89 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -906,7 +906,7 @@ int get_custom_limits (int *pw, int *ph, int *pdx, int *pdy, int *prealh) dbl2--; } - h = y2 - y1; + h = y2 - y1 + 1; dy = y1 - minfirstline; if (first_planes_vpos == 0) { -- 2.47.3