shithub: vdir

Download patch

ref: e72d4fab36053ef7261f0cbab6c615a2a4981cee
parent: f8eae3cf5fc1b25a399d5a999676baec21e1bc2a
author: phil9 <telephil9@gmail.com>
date: Thu Oct 7 13:44:15 EDT 2021

only flash for plumbed files (thanks sigrid)

	the visual effect is a bit long and does not add any significant
	feedback for directories where you are directly aware something happened.
	For plumbed files, on the contrary, this adds a confirmation that an action
	occured so we only flash in this case.
	In addition, flash occurs after the file is sent to the plumber to prevent
	a useless delay.

--- a/vdir.c
+++ b/vdir.c
@@ -512,13 +512,14 @@
 			n = indexat(m.xy);
 			if(n==-1)
 				return;
-			flash(n);
 			d = dirs[offset+n];
 			if(d.qid.type & QTDIR){
 				cd(d.name);
 				redraw();
-			}else
+			}else{
 				plumbfile(path, d.name);
+				flash(n);
+			}
 		}
 	}else if(m.buttons&8)
 		scrollup(Slowscroll);