dmenu: update to 4.9.

This commit is contained in:
Doan Tran Cong Danh 2019-02-04 07:04:29 +07:00 committed by maxice8
parent a86f6dd2f9
commit db9c144a3f
2 changed files with 11 additions and 20 deletions

View File

@ -1,14 +1,8 @@
From 34e4ada60c7ca73cfdd83a02c7416af39dfc0dc0 Mon Sep 17 00:00:00 2001
From: Andrea Brancaleoni <miwaxe@gmail.com>
Date: Tue, 10 Nov 2015 19:29:45 +0100
Subject: [PATCH] fuzzymatch-4.6
---
dmenu.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- dmenu.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 85 insertions(+), 4 deletions(-) 1 file changed, 85 insertions(+), 4 deletions(-)
diff --git a/dmenu.c b/dmenu.c diff --git a/dmenu.c b/dmenu.c
index a07f8e3..c26ecfc 100644 index 6b8f51b..4221233 100644
--- a/dmenu.c --- a/dmenu.c
+++ b/dmenu.c +++ b/dmenu.c
@@ -32,6 +32,7 @@ struct item { @@ -32,6 +32,7 @@ struct item {
@ -19,7 +13,7 @@ index a07f8e3..c26ecfc 100644
}; };
static char text[BUFSIZ] = ""; static char text[BUFSIZ] = "";
@@ -253,6 +254,86 @@ match(void) @@ -264,6 +265,86 @@ match(void)
calcoffsets(); calcoffsets();
} }
@ -106,7 +100,7 @@ index a07f8e3..c26ecfc 100644
static void static void
insert(const char *str, ssize_t n) insert(const char *str, ssize_t n)
{ {
@@ -263,7 +344,7 @@ insert(const char *str, ssize_t n) @@ -274,7 +355,7 @@ insert(const char *str, ssize_t n)
if (n > 0) if (n > 0)
memcpy(&text[cursor], str, n); memcpy(&text[cursor], str, n);
cursor += n; cursor += n;
@ -115,7 +109,7 @@ index a07f8e3..c26ecfc 100644
} }
static size_t static size_t
@@ -308,7 +389,7 @@ keypress(XKeyEvent *ev) @@ -343,7 +424,7 @@ keypress(XKeyEvent *ev)
case XK_k: /* delete right */ case XK_k: /* delete right */
text[cursor] = '\0'; text[cursor] = '\0';
@ -124,7 +118,7 @@ index a07f8e3..c26ecfc 100644
break; break;
case XK_u: /* delete left */ case XK_u: /* delete left */
insert(NULL, 0 - cursor); insert(NULL, 0 - cursor);
@@ -442,7 +523,7 @@ keypress(XKeyEvent *ev) @@ -492,7 +573,7 @@ insert:
strncpy(text, sel->text, sizeof text - 1); strncpy(text, sel->text, sizeof text - 1);
text[sizeof text - 1] = '\0'; text[sizeof text - 1] = '\0';
cursor = strlen(text); cursor = strlen(text);
@ -132,16 +126,13 @@ index a07f8e3..c26ecfc 100644
+ fuzzymatch(); + fuzzymatch();
break; break;
} }
drawmenu();
@@ -584,7 +665,7 @@ setup(void) @@ -648,7 +729,7 @@ setup(void)
} }
promptw = (prompt && *prompt) ? TEXTW(prompt) : 0; promptw = (prompt && *prompt) ? TEXTW(prompt) - lrpad / 4 : 0;
inputw = MIN(inputw, mw/3); inputw = MIN(inputw, mw/3);
- match(); - match();
+ fuzzymatch(); + fuzzymatch();
/* create menu window */ /* create menu window */
swa.override_redirect = True; swa.override_redirect = True;
--
2.6.3

View File

@ -1,14 +1,14 @@
# Template file for 'dmenu' # Template file for 'dmenu'
pkgname=dmenu pkgname=dmenu
version=4.8 version=4.9
revision=1 revision=1
makedepends="libXinerama-devel libXft-devel freetype-devel" makedepends="libXinerama-devel libXft-devel freetype-devel"
short_desc="A generic menu for X" short_desc="Generic menu for X"
maintainer="Juan RP <xtraeme@voidlinux.org>" maintainer="Juan RP <xtraeme@voidlinux.org>"
license="MIT" license="MIT"
homepage="https://tools.suckless.org/dmenu/" homepage="https://tools.suckless.org/dmenu/"
distfiles="https://dl.suckless.org/tools/${pkgname}-${version}.tar.gz" distfiles="https://dl.suckless.org/tools/${pkgname}-${version}.tar.gz"
checksum=fe615a5c3607061e2106700862e82ac62a9fa1e6a7ac3d616a9c76106476db61 checksum=b3971f4f354476a37b2afb498693649009b201550b0c7c88e866af8132b64945
build_options="fuzzymatch" build_options="fuzzymatch"
desc_option_fuzzymatch="Enable Fuzzymatch support" desc_option_fuzzymatch="Enable Fuzzymatch support"