[hackers] [wmii] Don't die when no menu choices are provided. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Fri, 29 May 2009 20:04:00 +0000 (UTC)

changeset: 2472:ad03a544b297
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Fri May 29 16:03:54 2009 -0400
files: cmd/menu/menu.c
description:
Don't die when no menu choices are provided.

diff -r 837a2768a0db -r ad03a544b297 cmd/menu/menu.c
--- a/cmd/menu/menu.c Wed May 27 13:27:08 2009 -0400
+++ b/cmd/menu/menu.c Fri May 29 16:03:54 2009 -0400
@@ -157,6 +157,8 @@
                 matchstart = matchidx;
         else if(matchidx == matchstart->prev)
                 matchend = matchidx;
+ if (matchend == nil)
+ matchend = matchstart;
 
         if(matchend == matchstart->prev && matchstart != matchidx) {
                 n = itemoff;
Received on Fri May 29 2009 - 20:04:00 UTC

This archive was generated by hypermail 2.2.0 : Fri May 29 2009 - 20:12:05 UTC