agl / xmpp-client

An XMPP client with OTR support
BSD 3-Clause "New" or "Revised" License
365 stars 71 forks source link

newline bug #124

Closed whoizit closed 7 years ago

whoizit commented 7 years ago

how can I fix it? https://transfer.sh/jx9gw/2016-09-26-181152-1920x1080-scrot.png

this is tmux into mosh

agl commented 7 years ago

What's the terminal stack in use here? (I.e. what's the OS, terminal emulator and any terminal manager programs running?)

whoizit commented 7 years ago

Archlinux

echo $TERM
screen

tmux into mosh (http://mosh.mit.edu/)

AkaBkn commented 7 years ago

i had the same problem with different terminals, operating systems. solution: replace all '\n' with '\r\n' in the source code.

mutantmonkey commented 7 years ago

I've run into this problem was well on Arch Linux and it appears to be independent of terminal emulator. I did not see it in a build of xmpp-client from January of this year, so I think that this bug may have been introduced with https://github.com/golang/crypto/commit/911fafb28f4ee7c7bd483539a6c96190bbbccc3f.

Edit: After reviewing my TTY settings, I figured out why this is happening. I noticed that ONLCR is set by default in my terminal. When OPOST is unset as done in that change, this flag will not be used to translate newlines in to carriage returns, leading to this problem.

agl commented 7 years ago

Should be fixed by https://go-review.googlesource.com/#/c/33902/.