terminology: correctly set device id

In vim, 'set ttymouse' was returning 'xterm' and not 'xterm2' because
the device id was incorrectly returned.

SVN revision: 78411
This commit is contained in:
Boris Faure 2012-10-24 21:34:25 +00:00
parent 8b54f15969
commit db90244654
1 changed files with 11 additions and 9 deletions

View File

@ -469,15 +469,17 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
case 'c': // query device id
{
char bf[32];
// 0 Base VT100, no options
// 1 Preprocessor option (STP)
// 2 Advanced video option (AVO)
// 3 AVO and STP
// 4 Graphics processor option (GO)
// 5 GO and STP
// 6 GO and AVO
// 7 GO, STP, and AVO
snprintf(bf, sizeof(bf), "\033[>1;271;%ic", 0);
// 0 → VT100
// 1 → VT220
// 2 → VT240
// 18 → VT330
// 19 → VT340
// 24 → VT320
// 41 → VT420
// 61 → VT510
// 64 → VT520
// 65 → VT525
snprintf(bf, sizeof(bf), "\033[>0;271;%ic", 0);
termpty_write(ty, bf, strlen(bf));
}
break;