Fix scroll-off-the-left for mouse scrolling. - sam - An updated version of the … | |
git clone git://vernunftzentrum.de/sam.git | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit d20e62a667c2fe41cf7d91061b92b96b125fda73 | |
parent 9f7a29efdb404b8c774a67e26988e06644970418 | |
Author: Rob King <[email protected]> | |
Date: Mon, 26 Jun 2017 18:02:01 -0500 | |
Fix scroll-off-the-left for mouse scrolling. | |
Credit to @siebenmann for the fix. | |
Diffstat: | |
samterm/main.c | 11 +++-------- | |
1 file changed, 3 insertions(+), 8 deletions(-) | |
--- | |
diff --git a/samterm/main.c b/samterm/main.c | |
@@ -546,14 +546,9 @@ cmdscrolldownline(Flayer *l, int64_t a, Text *t, const cha… | |
{ | |
int64_t e = t->rasp.nrunes; | |
- if (l->origin + l->f.nchars < e){ | |
- int64_t x = l->origin; | |
- while (x + l->f.nchars < e && raspc(&t->rasp, x) != '\n') | |
- x++; | |
- | |
- horigin(t->tag, x + 1, l); | |
- } else if (l->f.lastlinefull) | |
- horigin(t->tag, l->origin + 1, l); | |
+ horigin(t->tag, | |
+ l->origin + frcharofpt(&l->f,Pt(l->f.r.min.x, l->f.r.min.y + l->f.… | |
+ l); | |
return a; | |
} |