Hello,

if you have been bitten one too many times by Delete on rio, here's one
quick fix:

diff -r 7aac02e8704e src/cmd/rio/grab.c
--- a/src/cmd/rio/grab.c        Sat Feb 06 22:16:46 2010 -0800
+++ b/src/cmd/rio/grab.c        Tue Feb 09 00:11:33 2010 +0100
@@ -142,7 +142,8 @@
                        else if(i < 0 || i >= n)
                                i = -1;
                        else
-                               m->lasthit = i;
+                               if(i != 3)
+                                       m->lasthit = i;
                        if(!nobuttons(&ev.xbutton))
                                i = -1;
                        ungrab(&ev.xbutton);

The way the button 3 menu works is the following: the entry selected
by default when you call the menu is the one that was used for the last
time. This change simply disables that behavior when the last operation
was Delete.

I did this because it has happened to me too often to select it by mistake
and to delete a window afterwards before I realized my mistake. I realize
this breaks the generic behavior, but on the other hand Delete is the
only operation that is not always easily reversible, so it didn't bother
me that much to make an exception for this one in the end.

Cheers,
Mathieu

P.S: tested only on p9p, I haven't checked on plan 9. I can do it if
anyone's interested.


Reply via email to