Config: Fix UGLY mistake (lenght -> length, thanks chacha)
This commit is contained in:
@@ -219,7 +219,7 @@ conf_bar_section(void)
|
|||||||
|
|
||||||
conf.selbar.bg = getcolor(fetch_opt_first(selbar, barbg, "bg").str);
|
conf.selbar.bg = getcolor(fetch_opt_first(selbar, barbg, "bg").str);
|
||||||
conf.selbar.fg = fetch_opt_first(selbar, conf.colors.text, "fg").str;
|
conf.selbar.fg = fetch_opt_first(selbar, conf.colors.text, "fg").str;
|
||||||
conf.selbar.maxlenght = fetch_opt_first(selbar, "-1", "max_lenght").num;
|
conf.selbar.maxlength = fetch_opt_first(selbar, "-1", "max_length").num;
|
||||||
|
|
||||||
mouse = fetch_section(selbar, "mouse");
|
mouse = fetch_section(selbar, "mouse");
|
||||||
|
|
||||||
|
|||||||
@@ -188,12 +188,12 @@ infobar_draw_selbar(int sc)
|
|||||||
else if(sel && !infobar[sc].selbar->mapped)
|
else if(sel && !infobar[sc].selbar->mapped)
|
||||||
barwin_map(infobar[sc].selbar);
|
barwin_map(infobar[sc].selbar);
|
||||||
|
|
||||||
if(conf.selbar.maxlenght >= 0 && sel)
|
if(conf.selbar.maxlength >= 0 && sel)
|
||||||
{
|
{
|
||||||
str = emalloc(conf.selbar.maxlenght + 4, sizeof(char));
|
str = emalloc(conf.selbar.maxlength + 4, sizeof(char));
|
||||||
strncpy(str, sel->title, conf.selbar.maxlenght);
|
strncpy(str, sel->title, conf.selbar.maxlength);
|
||||||
|
|
||||||
if(strlen(sel->title) > conf.selbar.maxlenght)
|
if(strlen(sel->title) > conf.selbar.maxlength)
|
||||||
strcat(str, "...");
|
strcat(str, "...");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -414,7 +414,7 @@ typedef struct
|
|||||||
{
|
{
|
||||||
char *fg;
|
char *fg;
|
||||||
uint bg;
|
uint bg;
|
||||||
int maxlenght;
|
int maxlength;
|
||||||
MouseBinding *mouse;
|
MouseBinding *mouse;
|
||||||
int nmouse;
|
int nmouse;
|
||||||
} selbar;
|
} selbar;
|
||||||
|
|||||||
Reference in New Issue
Block a user