diff --git a/TODO b/TODO index d471870..3652fe7 100644 --- a/TODO +++ b/TODO @@ -4,4 +4,3 @@ - Add configuration file using (probably) libconfig - Use higher level libraries, MD5() is deprecated as of OpenSSL 3 but it has been temporarily silenced. This might also improve compatibility for people who don't use OpenSSL. - Contextual completions -- Fix segmentation fault when using -P option (i don't have time to fix it just yet) diff --git a/docs/docs.md b/docs/docs.md index 474bd9c..36fd866 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -70,9 +70,6 @@ You may use long, descriptive arguments or the shorter arguments. `-P, --password ` : Hide characters -`-Ps, --password-symbol symbol ` -: Set the password symbol to symbol - `-p, --prompt text ` : Set spmenu prompt text to text diff --git a/libs/argv.c b/libs/argv.c index 3eeb95e..bd93eb1 100644 --- a/libs/argv.c +++ b/libs/argv.c @@ -169,8 +169,6 @@ readargs(int argc, char *argv[]) if (lines == 0) lines = 1; } else if (!strcmp(argv[i], "-mc") || (!strcmp(argv[i], "--max-cache"))) { // max cache maxcache = atoi(argv[++i]); - } else if (!strcmp(argv[i], "-") || (!strcmp(argv[i], "--password-symbol"))) { // password symbol - password = argv[++i]; } else if (!strcmp(argv[i], "-l") || (!strcmp(argv[i], "--lines"))) { // number of lines in grid lines = atoi(argv[++i]); } else if (!strcmp(argv[i], "-mh") || (!strcmp(argv[i], "--lineheight"))) { // line height @@ -363,7 +361,6 @@ usage(void) "spmenu -F, --fuzzy Enable fuzzy matching\n" "spmenu -NF, --no-fuzzy Disable fuzzy matching\n" "spmenu -P, --password Hide characters\n" - "spmenu -Ps, --password-symbol Set the password symbol to \n" "spmenu -p, --prompt Set spmenu prompt text to \n" "spmenu -ip, --indent Indent items to prompt width\n" "spmenu -nip, --no-indent Don't indent items to prompt width\n" diff --git a/libs/draw.c b/libs/draw.c index 1dbecec..01b146a 100644 --- a/libs/draw.c +++ b/libs/draw.c @@ -250,8 +250,8 @@ drawinput(int x, int y, int w) w = (lines > 0 || !matches) ? mw - x : inputw; drw_setscheme(drw, scheme[SchemeInput]); if (passwd && !hideprompt) { - censort = ecalloc(pango_input ? TEXTWM(password) : TEXTW(password), sizeof(text)); - memset(censort, *password, strlen(text)); + censort = ecalloc(1, sizeof(text)); + memset(censort, (int)password, strlen(text)); apply_fribidi(censort); drw_text(drw, x, 0, w, bh, lrpad / 2, isrtl ? fribidi_text : censort, 0, pango_password ? True : False); diff --git a/options.h b/options.h index 25b1751..2d88816 100644 --- a/options.h +++ b/options.h @@ -40,7 +40,7 @@ static char font[] = "Noto Sans Mono 8"; /* Font to draw tex /* Symbol options */ static char *leftarrow = "<"; /* Left arrow, used to indicate you can move to the left */ static char *rightarrow = ">"; /* Right arrow, used to indicate you can move to the right */ -static char *password = "."; /* Password character, when the -P argument is active this will replace all characters typed */ +static char password = '*'; /* Password character, when the -P argument is active this will replace all characters typed */ /* Match options */ static int type = 1; /* Allow typing into spmenu or only allow keybinds. */ diff --git a/spmenu.1 b/spmenu.1 index f248d97..5a8b108 100644 --- a/spmenu.1 +++ b/spmenu.1 @@ -86,9 +86,6 @@ Disable fuzzy matching \f[V]-P, --password\f[R] Hide characters .TP -\f[V]-Ps, --password-symbol symbol\f[R] -Set the password symbol to symbol -.TP \f[V]-p, --prompt text\f[R] Set spmenu prompt text to text .TP