aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2025-11-15 21:11:29 -0500
committerelioat <elioat@tilde.institute>2025-11-15 21:11:29 -0500
commit333af2a092a77437e1d933b610ffded83449a5d2 (patch)
tree01e8f989ed4ef58fd9e78c996540fb0a42fb7ecc
parentd026f91f5a0918cb02b17cbf79d5259ffc80324e (diff)
downloadtour-333af2a092a77437e1d933b610ffded83449a5d2.tar.gz
Remove extra newline from read_line_no_echo
When user presses enter, terminal naturally adds a newline. We don't need to add another one, which was creating blank lines in the output.
-rw-r--r--gleam/gossip/src/gossip_utils.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/gleam/gossip/src/gossip_utils.erl b/gleam/gossip/src/gossip_utils.erl
index dbd37a9..a944937 100644
--- a/gleam/gossip/src/gossip_utils.erl
+++ b/gleam/gossip/src/gossip_utils.erl
@@ -31,8 +31,8 @@ read_line_no_echo() ->
io:setopts(user, [{echo, false}]),
Line = read_line(),
io:setopts(user, [{echo, true}]),
- % Print newline since we didn't echo it
- io:nl(),
+ % Note: We don't print a newline here because the terminal will add one
+ % when the user presses enter, and we don't want an extra blank line
Line
catch
_:_ ->