JuiceSSH apparently has a bug where ECH for one character (ESC [ 1 X) does
not actually erase the character, in its code that receives and interprets
Mosh state updates. This was hidden before because Mosh <= 1.2.5 never sent
this sequence, it sent ESC [ X instead as an optimization.
Do the better optimization of sending spaces for short sequences of blanks
instead.
This uses the same utility function that mosh-client/mosh-server do.
This resolves portability issues with the 'locale' command.
This fixes OpenBSD 6.0 and probably Haiku builds.
Unaligned data on ARM architectures do not perform efficiently unaligned
memory access, and in the case of ARMv7 and iOS it completely breaks. The OCB
algorithm dereferences a uint64x2_t pointer, and is replaced by a
memcpy to avoid penalties when trying to align it.
More info https://brewx.qualcomm.com/bws/content/gi/common/appseng/en/knowledgebase/docs/kb95.html
Also makes this bit of code more readable, but the overall handling of
Unicode characters in Actions and Transitions is messy, and may get
reworked later.
These should output to stdout and exit with status 0. Passing
std-options to AM_INIT_AUTOMAKE causes ‘make installcheck’ (hence also
‘make distcheck’) to verify this.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
A character cell can only be either narrow or wide. It's more
convenient to represent that as an int containing 1 or 2, but slightly
more correct to represent it as a "boolean" single-bit integer.
The terminal framebuffer was not resetting the wrap state of a row
when a previously-wrapping line was overwritten by a non-wrapping
line. Restore previous, subtle behavior of line wrap. Fix wrap
verification bug now exposed by emulation-wrap-across-frames.test.
Also hoist some getters, mostly for clarity.
Fixes#820.
None of the previous tests even ran the mosh script unless tmux ≥ 1.8 is
installed. Thus ‘make check’ was “passing” on, e.g., RHEL 6 even though
its Perl is too old (5.10.1).
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
The root problem here is that writes to the frame buffer may alter it,
but leave it with the same contents as before, and the diff between
the two states is the empty string. With the dirty-rows,
smart-pointer changes to Framebuffer, it is easy to run into this
situation. This got Network::TransportSender confused about timeouts,
and mosh-server would spin.
The theoretically correct fix would be to have operator==() exactly
correspond to diff(otherstate).empty(). I have partly implemented
this (and may yet finish) but it's not trivial to get right.
This is a much simpler fix that simply attempts to correctly update
timers when two framebuffers are different and an empty diff is
generated.
Some systems do not deliver SIGPIPE to shell pipeline writers when the
downstream reader has exited. So, also check for errors from
/bin/printf. I fixed this for OpenBSD 6.0 but I think it will also
fix posh on Linux.