diff options
author | Moritz Luedecke <ritze@skweez.net> | 2017-08-20 15:56:37 +0200 |
---|---|---|
committer | Moritz Luedecke <ritze@skweez.net> | 2017-08-20 15:56:37 +0200 |
commit | 3a47ab1cecdb9e75d5837181daf707a4f7a656c4 (patch) | |
tree | 1db5aecf513bf79862fe41dbe0af74b062548a4c | |
parent | 2054d41f376b409e7b963bc332173f826a227ea3 (diff) |
Replace newline characters with whitespace
-rw-r--r-- | pinentry-dmenu.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 { |