summaryrefslogtreecommitdiff
path: root/pinentry-dmenu.c
diff options
context:
space:
mode:
authorMoritz Luedecke <ritze@skweez.net>2017-08-20 15:56:37 +0200
committerMoritz Luedecke <ritze@skweez.net>2017-08-20 15:56:37 +0200
commit3a47ab1cecdb9e75d5837181daf707a4f7a656c4 (patch)
tree1db5aecf513bf79862fe41dbe0af74b062548a4c /pinentry-dmenu.c
parent2054d41f376b409e7b963bc332173f826a227ea3 (diff)
Replace newline characters with whitespace
Diffstat (limited to 'pinentry-dmenu.c')
-rw-r--r--pinentry-dmenu.c7
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 {