diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-04-22 00:55:58 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-04-22 00:55:58 +0200 |
commit | 81c9ede53f6f9ebd67e7134e664c98e08b9fcca6 (patch) | |
tree | 5ce349cdd0354a8ba877d3aa4b09953152126928 | |
parent | 2c317dccea27212b4a2ba42bd792740ea4bbc689 (diff) |
samterm: don't scroll invisible (command) window (thanks umbraticus)
with scroll-wheel scrolling, this case can happen with the
command window:
umbraticus → cinap: create fullscreen file buffer by right-clicking in cmd window
-rw-r--r-- | sys/src/cmd/samterm/scroll.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |