From 3a47ab1cecdb9e75d5837181daf707a4f7a656c4 Mon Sep 17 00:00:00 2001 From: Moritz Luedecke Date: Sun, 20 Aug 2017 15:56:37 +0200 Subject: Replace newline characters with whitespace --- pinentry-dmenu.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'pinentry-dmenu.c') diff --git a/pinentry-dmenu.c b/pinentry-dmenu.c index fa39b3f..949d2c1 100644 --- 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 { -- cgit v1.2.3