From 81c9ede53f6f9ebd67e7134e664c98e08b9fcca6 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Wed, 22 Apr 2020 00:55:58 +0200 Subject: samterm: don't scroll invisible (command) window (thanks umbraticus) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit with scroll-wheel scrolling, this case can happen with the command window: umbraticus → cinap: create fullscreen file buffer by right-clicking in cmd window --- sys/src/cmd/samterm/scroll.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/src/cmd/samterm/scroll.c b/sys/src/cmd/samterm/scroll.c index d40ab688f..e710cc910 100644 --- a/sys/src/cmd/samterm/scroll.c +++ b/sys/src/cmd/samterm/scroll.c @@ -111,6 +111,9 @@ scroll(Flayer *l, int but) int x, y, my, oy, h; long p0; + if(l->visible==None) + return; + s = l->scroll; x = s.min.x+FLSCROLLWID/2; scr = scrpos(l->scroll, l->origin, l->origin+l->f.nchars, tot); -- cgit v1.2.3