~rabbits/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch

[PATCH left] setscroll: Don't do invalid scroll when clamp(y,0,-15) returns a negative number

Details
Message ID
<20210109220238.10872-1-zachdecook@librem.one>
DKIM signature
missing
Download raw message
Patch: +2 -1
---
 left.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/left.c b/left.c
index e91e1d6..48bb05b 100644
--- a/left.c
+++ b/left.c
@@ -342,8 +342,9 @@ error(char *msg, const char *err)
void
setscroll(int x, int y)
{
	y = clamp(y, 0, getrow(doc.len) - VER);
	if(y >= 0) {
		view.y = clamp(y, 0, getrow(doc.len) - VER);
		view.y = y;
		redraw(pixels);
	}
}
-- 
2.29.2
Reply to thread Export thread (mbox)