diff options
author | bptato <nincsnevem662@gmail.com> | 2025-05-08 22:23:52 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2025-05-08 22:23:52 +0200 |
commit | 981f363692a845e44a803bcc6def3a2dc6dbe7d2 (patch) | |
tree | 05630050cda530acb0274e36ddbce4ff1b30b8ef | |
parent | a36b314acb8c327ea6a9d01e79c7d2a41cce69cf (diff) | |
download | chawan-981f363692a845e44a803bcc6def3a2dc6dbe7d2.tar.gz |
pager: remove pointless clamp
-rw-r--r-- | src/local/pager.nim | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/local/pager.nim b/src/local/pager.nim index 1447ca94..1402ed14 100644 --- a/src/local/pager.nim +++ b/src/local/pager.nim @@ -1209,8 +1209,7 @@ proc initImages(pager: Pager; container: Container) = let xpx = (image.x - container.fromx) * pager.attrs.ppc offx = -min(xpx, 0) let maxwpx = pager.bufWidth * pager.attrs.ppc - let width = min(image.width - offx, pager.attrs.widthPx) + offx - dispw = min(width + xpx, maxwpx) - xpx + dispw = min(image.width + xpx, maxwpx) - xpx let ypx = (image.y - container.fromy) * pager.attrs.ppl erry = -min(ypx, 0) mod 6 if dispw <= offx: |