pinentry-dmenu

a pinentry program based on dmenu
git clone anongit@rnpnr.xyz:pinentry-dmenu.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 3a47ab1cecdb9e75d5837181daf707a4f7a656c4
Parent: 2054d41f376b409e7b963bc332173f826a227ea3
Author: Moritz Luedecke
Date:   Sun, 20 Aug 2017 15:56:37 +0200

Replace newline characters with whitespace

Diffstat:
Mpinentry-dmenu.c | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/pinentry-dmenu.c b/pinentry-dmenu.c @@ -177,6 +177,13 @@ drawwin(void) { pbw = MIN(pbw, pb); pb = mw - pbw; desc = pinentry->description; + + for (i = 0; i < pdesclen; i++) { + if (desc[i] == '\n') { + desc[i] = ' '; + } + } + drw_setscheme(drw, scheme[SchemeDesc]); drw_text(drw, pb, 0, pbw, bh, lrpad / 2, desc, 0); } else {