comparison finch/libgnt/gntkeys.c @ 25420:135ee310d62c

Need some refining for vt100 too, apparently. Fixes #8335.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 04 Feb 2009 22:46:08 +0000
parents 06ab3599f0db
children 3b6f50b68f5d
comparison
equal deleted inserted replaced
25419:4278d13b5471 25420:135ee310d62c
161 text++; 161 text++;
162 if (*text == 27 && *(text + 1) == '[' && 162 if (*text == 27 && *(text + 1) == '[' &&
163 (*(text + 2) >= 'A' && *(text + 2) <= 'D')) { 163 (*(text + 2) >= 'A' && *(text + 2) <= 'D')) {
164 /* Apparently this is necessary for urxvt and screen and xterm */ 164 /* Apparently this is necessary for urxvt and screen and xterm */
165 if (strstr(term, "screen") == term || strcmp(term, "rxvt-unicode") == 0 || 165 if (strstr(term, "screen") == term || strcmp(term, "rxvt-unicode") == 0 ||
166 strstr(term, "xterm") == term) 166 strstr(term, "xterm") == term ||
167 strstr(term, "vt100") == term)
167 *(text + 1) = 'O'; 168 *(text + 1) = 'O';
168 } else if (*(unsigned char*)text == 195) { 169 } else if (*(unsigned char*)text == 195) {
169 if (*(text + 2) == 0 && strstr(term, "xterm") == term) { 170 if (*(text + 2) == 0 && strstr(term, "xterm") == term) {
170 *(text) = 27; 171 *(text) = 27;
171 *(text + 1) -= 64; /* Say wha? */ 172 *(text + 1) -= 64; /* Say wha? */