Hello community, here is the log from the commit of package dmenu for openSUSE:Factory checked in at 2018-04-16 12:50:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dmenu (Old) and /work/SRC/openSUSE:Factory/.dmenu.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dmenu" Mon Apr 16 12:50:06 2018 rev:10 rq:596693 version:4.8 Changes: -------- --- /work/SRC/openSUSE:Factory/dmenu/dmenu.changes 2018-02-10 17:58:50.170679186 +0100 +++ /work/SRC/openSUSE:Factory/.dmenu.new/dmenu.changes 2018-04-16 12:50:13.050431202 +0200 @@ -1,0 +2,6 @@ +Sun Apr 15 00:12:26 UTC 2018 - [email protected] + +- bump to 4.8 + for complete list of changes see + see https://git.suckless.org/dmenu/log/?h=4.8&qt=range&q=4.7..4.8 +------------------------------------------------------------------- Old: ---- dmenu-4.7.tar.gz New: ---- dmenu-4.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dmenu.spec ++++++ --- /var/tmp/diff_new_pack.1aKZ7A/_old 2018-04-16 12:50:14.682371842 +0200 +++ /var/tmp/diff_new_pack.1aKZ7A/_new 2018-04-16 12:50:14.686371696 +0200 @@ -17,7 +17,7 @@ Name: dmenu -Version: 4.7 +Version: 4.8 Release: 0 Summary: A generic and efficient menu for X License: MIT ++++++ dmenu-4.7.tar.gz -> dmenu-4.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dmenu-4.7/config.mk new/dmenu-4.8/config.mk --- old/dmenu-4.7/config.mk 2017-05-02 18:36:47.000000000 +0200 +++ new/dmenu-4.8/config.mk 2018-03-14 20:26:40.000000000 +0100 @@ -1,5 +1,5 @@ # dmenu version -VERSION = 4.7 +VERSION = 4.8 # paths PREFIX = /usr/local diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dmenu-4.7/dmenu.1 new/dmenu-4.8/dmenu.1 --- old/dmenu-4.7/dmenu.1 2017-05-02 18:36:47.000000000 +0200 +++ new/dmenu-4.8/dmenu.1 2018-03-14 20:26:40.000000000 +0100 @@ -100,6 +100,12 @@ .B Escape Exit without selecting an item, returning failure. .TP +.B Ctrl-Left +Move cursor to the start of the current word +.TP +.B Ctrl-Right +Move cursor to the end of the current word +.TP C\-a Home .TP @@ -160,6 +166,12 @@ C\-Y Paste from X clipboard .TP +M\-b +Move cursor to the start of the current word +.TP +M\-f +Move cursor to the end of the current word +.TP M\-g Home .TP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dmenu-4.7/dmenu.c new/dmenu-4.8/dmenu.c --- old/dmenu-4.7/dmenu.c 2017-05-02 18:36:47.000000000 +0200 +++ new/dmenu-4.8/dmenu.c 2018-03-14 20:26:40.000000000 +0100 @@ -288,6 +288,22 @@ } static void +movewordedge(int dir) +{ + if (dir < 0) { /* move cursor to the start of the word*/ + while (cursor > 0 && strchr(worddelimiters, text[nextrune(-1)])) + cursor = nextrune(-1); + while (cursor > 0 && !strchr(worddelimiters, text[nextrune(-1)])) + cursor = nextrune(-1); + } else { /* move cursor to the end of the word */ + while (text[cursor] && strchr(worddelimiters, text[cursor])) + cursor = nextrune(+1); + while (text[cursor] && !strchr(worddelimiters, text[cursor])) + cursor = nextrune(+1); + } +} + +static void keypress(XKeyEvent *ev) { char buf[32]; @@ -334,6 +350,14 @@ XConvertSelection(dpy, (ev->state & ShiftMask) ? clip : XA_PRIMARY, utf8, utf8, win, CurrentTime); return; + case XK_Left: + movewordedge(-1); + ksym = NoSymbol; + break; + case XK_Right: + movewordedge(+1); + ksym = NoSymbol; + break; case XK_Return: case XK_KP_Enter: break; @@ -345,6 +369,14 @@ } else if (ev->state & Mod1Mask) switch(ksym) { + case XK_b: + movewordedge(-1); + ksym = NoSymbol; + break; + case XK_f: + movewordedge(+1); + ksym = NoSymbol; + break; case XK_g: ksym = XK_Home; break; case XK_G: ksym = XK_End; break; case XK_h: ksym = XK_Up; break; @@ -359,6 +391,8 @@ if (!iscntrl(*buf)) insert(buf, len); break; + case NoSymbol: + break; case XK_Delete: if (text[cursor] == '\0') return; @@ -467,10 +501,12 @@ Atom da; /* we have been given the current selection, now insert it into input */ - XGetWindowProperty(dpy, win, utf8, 0, (sizeof text / 4) + 1, False, - utf8, &da, &di, &dl, &dl, (unsigned char **)&p); - insert(p, (q = strchr(p, '\n')) ? q - p : (ssize_t)strlen(p)); - XFree(p); + if (XGetWindowProperty(dpy, win, utf8, 0, (sizeof text / 4) + 1, False, + utf8, &da, &di, &dl, &dl, (unsigned char **)&p) + == Success && p) { + insert(p, (q = strchr(p, '\n')) ? q - p : (ssize_t)strlen(p)); + XFree(p); + } drawmenu(); } @@ -539,22 +575,21 @@ static void setup(void) { - int x, y, i = 0; + int x, y, i, j; unsigned int du; XSetWindowAttributes swa; XIM xim; Window w, dw, *dws; XWindowAttributes wa; + XClassHint ch = {"dmenu", "dmenu"}; #ifdef XINERAMA XineramaScreenInfo *info; Window pw; - int a, j, di, n, area = 0; + int a, di, n, area = 0; #endif - /* init appearance */ - scheme[SchemeNorm] = drw_scm_create(drw, colors[SchemeNorm], 2); - scheme[SchemeSel] = drw_scm_create(drw, colors[SchemeSel], 2); - scheme[SchemeOut] = drw_scm_create(drw, colors[SchemeOut], 2); + for (j = 0; j < SchemeLast; j++) + scheme[j] = drw_scm_create(drw, colors[j], 2); clip = XInternAtom(dpy, "CLIPBOARD", False); utf8 = XInternAtom(dpy, "UTF8_STRING", False); @@ -564,6 +599,7 @@ lines = MAX(lines, 0); mh = (lines + 1) * bh; #ifdef XINERAMA + i = 0; if (parentwin == root && (info = XineramaQueryScreens(dpy, &n))) { XGetInputFocus(dpy, &w, &di); if (mon >= 0 && mon < n) @@ -613,6 +649,7 @@ win = XCreateWindow(dpy, parentwin, x, y, mw, mh, 0, CopyFromParent, CopyFromParent, CopyFromParent, CWOverrideRedirect | CWBackPixel | CWEventMask, &swa); + XSetClassHint(dpy, win, &ch); /* open input methods */ xim = XOpenIM(dpy, NULL, NULL, NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dmenu-4.7/drw.c new/dmenu-4.8/drw.c --- old/dmenu-4.7/drw.c 2017-05-02 18:36:47.000000000 +0200 +++ new/dmenu-4.8/drw.c 2018-03-14 20:26:40.000000000 +0100 @@ -200,7 +200,7 @@ Clr *ret; /* need at least two colors for a scheme */ - if (!drw || !clrnames || clrcount < 2 || !(ret = ecalloc(clrcount, sizeof(XftColor)))) + if (!drw || !clrnames || clrcount < 2 || !(ret = ecalloc(clrcount, sizeof(Clr)))) return NULL; for (i = 0; i < clrcount; i++)
