about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ui/core.c b/src/ui/core.c
index 9668a7a3..50fa8539 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -193,6 +193,10 @@ ui_get_char(char *input, int *size)
         ui_input_nonblocking(FALSE);
     }
 
+    if (ch == '\n') {
+        input[*size++] = '\0';
+    }
+
     return (ch != '\n');
 }