shithub: riscv

Download patch

ref: 81c9ede53f6f9ebd67e7134e664c98e08b9fcca6
parent: 2c317dccea27212b4a2ba42bd792740ea4bbc689
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Apr 21 20:55:58 EDT 2020

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

--- a/sys/src/cmd/samterm/scroll.c
+++ b/sys/src/cmd/samterm/scroll.c
@@ -111,6 +111,9 @@
 	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);