Avoid CHA sequence for ANSI.SYS compatibility.

Github user @welash proposed a change in issue #73 in order to improve
the linenoise compatibility with older terminal emulators only able to
deal with a subset of ANSI sequences, notably ANSI.SYS and VT100
terminals strictly able to handle the original set of VT100 escape
sequences.

In order to improve the compatibility, the CHA sequence was removed and
translated to move 999 positions to the left, then move on the right
for the desired number of positions. The CHA sequence was apparently
added only with VT220, that's why it is not available everywhere.

This commit features almost exactly the change proposed in issue #73
with a small fix for a bug in multi-line editing mode introduced by the
patch.
1 file changed
tree: 2d7943c5b7fc50d59b3ba2d4bae2812f5b8f12d3
  1. .gitignore
  2. Makefile
  3. README.markdown
  4. example.c
  5. linenoise.c
  6. linenoise.h