summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/gui-bar-item.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/gui-bar-item.c b/src/gui/gui-bar-item.c
index 505b784ef..b7fda83ff 100644
--- a/src/gui/gui-bar-item.c
+++ b/src/gui/gui-bar-item.c
@@ -963,6 +963,21 @@ gui_bar_item_input_text_cb (const void *pointer, void *data,
}
}
+ /*
+ * if multiline is enabled in buffer, transform '\n' to '\r' to the
+ * newlines are displayed as real new lines instead of spaces
+ */
+ if (buffer->input_multiline)
+ {
+ ptr_input2 = ptr_input;
+ while (ptr_input2 && ptr_input2[0])
+ {
+ if (ptr_input2[0] == '\n')
+ ptr_input2[0] = '\r';
+ ptr_input2 = (char *)utf8_next_char (ptr_input2);
+ }
+ }
+
return ptr_input;
}