aboutsummaryrefslogtreecommitdiffstats
path: root/search.c
diff options
context:
space:
mode:
authorokan2015-07-12 14:31:47 +0000
committerokan2015-07-12 14:31:47 +0000
commitb05f7a824f98fee35cc1fd31eae62460a743075c (patch)
treeee572128d6bb3c2f96ba7393cd25d10e2064b68d /search.c
parent1c42563c9b3c1a385b355c4ddc189364d05b4257 (diff)
downloadcwm-b05f7a824f98fee35cc1fd31eae62460a743075c.tar.gz
introduce 'groupsearch' for group menu search; matches on either group
number/shortcut and/or name.
Diffstat (limited to '')
-rw-r--r--search.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/search.c b/search.c
index 44311fd..7f64460 100644
--- a/search.c
+++ b/search.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: search.c,v 1.48 2015/07/01 14:36:42 okan Exp $
+ * $OpenBSD: search.c,v 1.49 2015/07/12 14:31:47 okan Exp $
*/
#include <sys/types.h>
@@ -138,6 +138,16 @@ search_print_cmd(struct menu *mi, int i)
}
void
+search_print_group(struct menu *mi, int i)
+{
+ struct group_ctx *gc = (struct group_ctx *)mi->ctx;
+
+ (void)snprintf(mi->print, sizeof(mi->print),
+ (group_holds_only_hidden(gc)) ? "%d: [%s]" : "%d: %s",
+ gc->num, gc->name);
+}
+
+void
search_print_client(struct menu *mi, int list)
{
struct client_ctx *cc = (struct client_ctx *)mi->ctx;