consolidate ESC sequences

function                                             old     new   delta
bell                                                   2       -      -2
CMdown                                                 2       -      -2
Ceos                                                   4       -      -4
Ceol                                                   4       -      -4
CMup                                                   4       -      -4
SOs                                                    5       -      -5
SOn                                                    5       -      -5
CMrc                                                   9       -      -9

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2010-05-16 23:42:13 +02:00
parent 26e2c1db0d
commit d9a3e89f50
8 changed files with 29 additions and 27 deletions

View File

@@ -60,18 +60,18 @@ enum {
/* vt102 typical ESC sequence */
/* terminal standout start/normal ESC sequence */
static const char SOs[] ALIGN1 = "\033[7m";
static const char SOn[] ALIGN1 = "\033[0m";
#define SOs "\033[7m"
#define SOn "\033[0m"
/* terminal bell sequence */
static const char bell[] ALIGN1 = "\007";
#define bell "\007"
/* Clear-end-of-line and Clear-end-of-screen ESC sequence */
static const char Ceol[] ALIGN1 = "\033[K";
static const char Ceos[] ALIGN1 = "\033[J";
#define Ceol "\033[K"
#define Ceos "\033[J"
/* Cursor motion arbitrary destination ESC sequence */
static const char CMrc[] ALIGN1 = "\033[%d;%dH";
#define CMrc "\033[%u;%uH"
/* Cursor motion up and down ESC sequence */
static const char CMup[] ALIGN1 = "\033[A";
static const char CMdown[] ALIGN1 = "\n";
#define CMup "\033[A"
#define CMdown "\n"
#if ENABLE_FEATURE_VI_DOT_CMD || ENABLE_FEATURE_VI_YANKMARK
// cmds modifying text[]