Better specify the set of escapes used.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
diff --git a/README.markdown b/README.markdown
index 2d21dc4..c845673 100644
--- a/README.markdown
+++ b/README.markdown
@@ -7,6 +7,7 @@ MongoDB, and Android.
* History handling.
* Completion.
* About 1,100 lines of BSD license source code.
+* Only uses a subset of VT100 escapes (ANSI.SYS compatible).
## Can a line editing library be 20k lines of code?
@@ -23,9 +24,8 @@ So I spent more or less two hours doing a reality check resulting in this little
## Terminals, in 2010.
-Apparently almost every terminal you can happen to use today has some kind of support for VT100 alike escape sequences. So I tried to write a lib using just very basic VT100 features. The resulting library appears to work everywhere I tried to use it.
-
-Since it's so young I guess there are a few bugs, or the lib may not compile or work with some operating system, but it's a matter of a few weeks and eventually we'll get it right, and there will be no excuses for not shipping command line tools without built-in line editing support.
+Apparently almost every terminal you can happen to use today has some kind of support for basic VT100 escape sequences. So I tried to write a lib using just very basic VT100 features. The resulting library appears to work everywhere I tried to use it, and now can work even on ANSI.SYS compatible terminals, since no
+VT220 specific sequences are used anymore.
The library is currently about 1100 lines of code. In order to use it in your project just look at the *example.c* file in the source distribution, it is trivial. Linenoise is BSD code, so you can use both in free software and commercial software.
@@ -40,6 +40,7 @@ The library is currently about 1100 lines of code. In order to use it in your pr
* OpenBSD 4.5 through an OSX Terminal.app ($TERM = screen)
* IBM AIX 6.1
* FreeBSD xterm ($TERM = xterm)
+ * ANSI.SYS
Please test it everywhere you can and report back!
diff --git a/linenoise.c b/linenoise.c
index 385932b..940c5a4 100644
--- a/linenoise.c
+++ b/linenoise.c
@@ -89,14 +89,15 @@
* Sequence: ESC [ n B
* Effect: moves cursor down of n chars.
*
- * The following are used to clear the screen: ESC [ H ESC [ 2 J
- * This is actually composed of two sequences:
+ * When linenoiseClearScreen() is called, two additional escape sequences
+ * are used in order to clear the screen and position the cursor at home
+ * position.
*
- * cursorhome
+ * CUP (Cursor position)
* Sequence: ESC [ H
* Effect: moves the cursor to upper left corner
*
- * ED2 (Clear entire screen)
+ * ED (Erase display)
* Sequence: ESC [ 2 J
* Effect: clear the whole screen
*