forked from speedie/spmenu
oops removed a line by accident
This commit is contained in:
parent
7e46fc7bb8
commit
d9f88e5ee3
|
@ -56,3 +56,4 @@ spmenu.class: spmenu
|
||||||
spmenu.leftarrow: <
|
spmenu.leftarrow: <
|
||||||
spmenu.rightarrow: >
|
spmenu.rightarrow: >
|
||||||
spmenu.hidematchcount: 0
|
spmenu.hidematchcount: 0
|
||||||
|
spmenu.hidehighlight: 0
|
||||||
|
|
|
@ -50,6 +50,7 @@ static char *prompt = NULL; /* Default prompt, set to NULL (n
|
||||||
|
|
||||||
/* Hide options */
|
/* Hide options */
|
||||||
static int hidematchcount = 0; /* Hide match count (0/1) */
|
static int hidematchcount = 0; /* Hide match count (0/1) */
|
||||||
|
static int hidehighlight = 0; /* Hide highlight (0/1) */
|
||||||
|
|
||||||
/* Color options
|
/* Color options
|
||||||
*
|
*
|
||||||
|
|
12
spmenu.c
12
spmenu.c
|
@ -346,9 +346,9 @@ drawitem(struct item *item, int x, int y, int w)
|
||||||
drw_text(drw, x, y, rw + lp, bh, lp, buffer, 0, True);
|
drw_text(drw, x, y, rw + lp, bh, lp, buffer, 0, True);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
drawhighlights(item, x, y, rw + lp);
|
|
||||||
x += rw + lp;
|
x += rw + lp;
|
||||||
ib = 1;
|
ib = 1;
|
||||||
|
lp = 0; /* no padding */
|
||||||
|
|
||||||
char *ep = item->text + rd + 1;
|
char *ep = item->text + rd + 1;
|
||||||
|
|
||||||
|
@ -388,19 +388,15 @@ drawitem(struct item *item, int x, int y, int w)
|
||||||
|
|
||||||
buffer[wr] = '\0';
|
buffer[wr] = '\0';
|
||||||
|
|
||||||
/* width needs to be decreased now because we've already drawn some text
|
|
||||||
* if we haven't drawn text, this does nothing at all. */
|
|
||||||
w -= rw;
|
|
||||||
|
|
||||||
/* draw any text that doesn't use sgr sequences */
|
/* draw any text that doesn't use sgr sequences */
|
||||||
#if USERTL
|
#if USERTL
|
||||||
apply_fribidi(buffer);
|
apply_fribidi(buffer);
|
||||||
int r = drw_text(drw, x, y, w, bh, lp, fribidi_text, 0, True);
|
int r = drw_text(drw, x, y, w - rw, bh, lp, fribidi_text, 0, True);
|
||||||
#else
|
#else
|
||||||
int r = drw_text(drw, x, y, w, bh, lp, buffer, 0, True);
|
int r = drw_text(drw, x, y, w - rw, bh, lp, buffer, 0, True);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!ib) drawhighlights(item, x, y, w);
|
if (!hidehighlight && !ib) drawhighlights(item, x, y, w - rw);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,6 +105,7 @@ ResourcePref resources[] = {
|
||||||
{ "columns", INTEGER, &columns },
|
{ "columns", INTEGER, &columns },
|
||||||
{ "maxhist", INTEGER, &maxhist },
|
{ "maxhist", INTEGER, &maxhist },
|
||||||
{ "hidematchcount", INTEGER, &hidematchcount },
|
{ "hidematchcount", INTEGER, &hidematchcount },
|
||||||
|
{ "hidehighlight", INTEGER, &hidehighlight },
|
||||||
{ "histnodup", INTEGER, &histnodup },
|
{ "histnodup", INTEGER, &histnodup },
|
||||||
{ "casesensitive", INTEGER, &casesensitive },
|
{ "casesensitive", INTEGER, &casesensitive },
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue