shithub: fm

Download patch

ref: 7633a56ff04b4d8ec683b34224c41304e422ca28
parent: 1582b3f523dd18147b2c32003584b990b6e58bfe
author: phil9 <telephil9@gmail.com>
date: Mon May 16 05:50:41 EDT 2022

prevent crash when right-clicking with no selection (thanks igor)

--- a/main.c	Fri Mar 11 15:29:10 2022
+++ b/main.c	Mon May 16 05:50:41 2022
@@ -284,7 +284,8 @@
 				lsel = n;
 			}
 			if(m->buttons == 4)
-				activate();
+				if(nmatches > 0 && lsel >= 0)
+					activate();
 		}else if(m->buttons == 8){
 			scroll(-scrollsize, 1);
 		}else if(m->buttons == 16){