diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-05-16 23:42:13 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-05-16 23:42:13 +0200 |
commit | d9a3e89f501800c3e7c779b7e9545a5c80134593 (patch) | |
tree | ba3b65ce2d512542a27e78f4820d799008bc0b4c /editors | |
parent | 26e2c1db0df35df1affa558efc12d2bcfd7718e2 (diff) | |
download | busybox-w32-d9a3e89f501800c3e7c779b7e9545a5c80134593.tar.gz busybox-w32-d9a3e89f501800c3e7c779b7e9545a5c80134593.tar.bz2 busybox-w32-d9a3e89f501800c3e7c779b7e9545a5c80134593.zip |
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>
Diffstat (limited to 'editors')
-rw-r--r-- | editors/vi.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/editors/vi.c b/editors/vi.c index b8cacb43f..d9124fd76 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -60,18 +60,18 @@ enum { | |||
60 | 60 | ||
61 | /* vt102 typical ESC sequence */ | 61 | /* vt102 typical ESC sequence */ |
62 | /* terminal standout start/normal ESC sequence */ | 62 | /* terminal standout start/normal ESC sequence */ |
63 | static const char SOs[] ALIGN1 = "\033[7m"; | 63 | #define SOs "\033[7m" |
64 | static const char SOn[] ALIGN1 = "\033[0m"; | 64 | #define SOn "\033[0m" |
65 | /* terminal bell sequence */ | 65 | /* terminal bell sequence */ |
66 | static const char bell[] ALIGN1 = "\007"; | 66 | #define bell "\007" |
67 | /* Clear-end-of-line and Clear-end-of-screen ESC sequence */ | 67 | /* Clear-end-of-line and Clear-end-of-screen ESC sequence */ |
68 | static const char Ceol[] ALIGN1 = "\033[K"; | 68 | #define Ceol "\033[K" |
69 | static const char Ceos[] ALIGN1 = "\033[J"; | 69 | #define Ceos "\033[J" |
70 | /* Cursor motion arbitrary destination ESC sequence */ | 70 | /* Cursor motion arbitrary destination ESC sequence */ |
71 | static const char CMrc[] ALIGN1 = "\033[%d;%dH"; | 71 | #define CMrc "\033[%u;%uH" |
72 | /* Cursor motion up and down ESC sequence */ | 72 | /* Cursor motion up and down ESC sequence */ |
73 | static const char CMup[] ALIGN1 = "\033[A"; | 73 | #define CMup "\033[A" |
74 | static const char CMdown[] ALIGN1 = "\n"; | 74 | #define CMdown "\n" |
75 | 75 | ||
76 | #if ENABLE_FEATURE_VI_DOT_CMD || ENABLE_FEATURE_VI_YANKMARK | 76 | #if ENABLE_FEATURE_VI_DOT_CMD || ENABLE_FEATURE_VI_YANKMARK |
77 | // cmds modifying text[] | 77 | // cmds modifying text[] |