ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.592 by root, Thu Jun 17 00:49:20 2021 UTC vs.
Revision 1.603 by root, Mon Jun 5 13:39:34 2023 UTC

25 * - extensive modifications 25 * - extensive modifications
26 * Copyright (c) 1998 Alfredo K. Kojima <kojima@windowmaker.org> 26 * Copyright (c) 1998 Alfredo K. Kojima <kojima@windowmaker.org>
27 * Copyright (c) 2001 Marius Gedminas 27 * Copyright (c) 2001 Marius Gedminas
28 * - Ctrl/Mod4+Tab works like Meta+Tab (options) 28 * - Ctrl/Mod4+Tab works like Meta+Tab (options)
29 * Copyright (c) 2003 Rob McMullen <robm@flipturn.org> 29 * Copyright (c) 2003 Rob McMullen <robm@flipturn.org>
30 * Copyright (c) 2003-2014 Marc Lehmann <schmorp@schmorp.de> 30 * Copyright (c) 2003-2021 Marc Lehmann <schmorp@schmorp.de>
31 * Copyright (c) 2007,2015 Emanuele Giaquinta <e.giaquinta@glauco.it> 31 * Copyright (c) 2007,2015 Emanuele Giaquinta <e.giaquinta@glauco.it>
32 * 32 *
33 * This program is free software; you can redistribute it and/or modify 33 * This program is free software; you can redistribute it and/or modify
34 * it under the terms of the GNU General Public License as published by 34 * it under the terms of the GNU General Public License as published by
35 * the Free Software Foundation; either version 3 of the License, or 35 * the Free Software Foundation; either version 3 of the License, or
84 XK_Right, 0x2192, 84 XK_Right, 0x2192,
85 XK_KP_Right, 0x2192, 85 XK_KP_Right, 0x2192,
86 XK_Down, 0x2193, 86 XK_Down, 0x2193,
87 XK_KP_Down, 0x2193, 87 XK_KP_Down, 0x2193,
88 XK_Linefeed, 0x21b4, 88 XK_Linefeed, 0x21b4,
89 XK_Return, 0x21b5,
90 XK_KP_Enter, 0x21b5,
91 89
92 XK_Prior, 0x21de, 90 XK_Prior, 0x21de,
93 XK_Next, 0x21df, 91 XK_Next, 0x21df,
94 XK_Tab, 0x21e5, 92 XK_Tab, 0x21e5,
95 XK_ISO_Left_Tab, 0x21e6, 93 XK_ISO_Left_Tab, 0x21e6,
110 XK_Begin, 0x2320, 108 XK_Begin, 0x2320,
111 XK_Delete, 0x2326, 109 XK_Delete, 0x2326,
112 XK_Clear, 0x2327, 110 XK_Clear, 0x2327,
113 XK_BackSpace, 0x232b, 111 XK_BackSpace, 0x232b,
114 XK_Insert, 0x2380, 112 XK_Insert, 0x2380,
113 XK_KP_Enter, 0x2386,
114 XK_Alt_L, 0x2387,
115 XK_Alt_R, 0x2387,
115 XK_Control_L, 0x2388, 116 XK_Control_L, 0x2388,
116 XK_Control_R, 0x2388, 117 XK_Control_R, 0x2388,
117 XK_Pause, 0x2389, 118 XK_Pause, 0x2389,
118 XK_Break, 0x238a, 119 XK_Break, 0x238a,
119 XK_Escape, 0x238b, 120 XK_Escape, 0x238b,
120 XK_Undo, 0x238c, 121 XK_Undo, 0x238c,
121 XK_Print, 0x2399, 122 XK_Print, 0x2399,
123 XK_Return, 0x23ce,
122 124
123 XK_space, 0x2423, 125 XK_space, 0x2423,
124 126
125#ifdef XK_KP_Begin 127#ifdef XK_KP_Begin
126 XK_KP_Prior, 0x21de, 128 XK_KP_Prior, 0x21de,
1016/* checks whether a refresh is requested and starts the refresh timer */ 1018/* checks whether a refresh is requested and starts the refresh timer */
1017void 1019void
1018rxvt_term::refresh_check () 1020rxvt_term::refresh_check ()
1019{ 1021{
1020 if (want_refresh && !flush_ev.is_active ()) 1022 if (want_refresh && !flush_ev.is_active ())
1021 flush_ev.start (1. / 60.); // refresh at max. 60 Hz normally 1023 flush_ev.start ();
1022 1024
1023 display->flush (); 1025 display->flush ();
1024} 1026}
1025 1027
1026void 1028void
1281{ 1283{
1282 int button_number, state = 0; 1284 int button_number, state = 0;
1283 int x, y; 1285 int x, y;
1284 bool release = ev.type == ButtonRelease; 1286 bool release = ev.type == ButtonRelease;
1285 1287
1286 x = Pixel2Col (ev.x) + 1; 1288 x = 1 + clamp (Pixel2Col (ev.x), 0, ncol - 1);
1287 y = Pixel2Row (ev.y) + 1; 1289 y = 1 + clamp (Pixel2Row (ev.y), 0, nrow - 1);
1288 1290
1289 if (ev.type == MotionNotify) 1291 if (ev.type == MotionNotify)
1290 { 1292 {
1291 if (x == mouse_row && y == mouse_col) 1293 if (x == mouse_row && y == mouse_col)
1292 return; 1294 return;
1295 mouse_col = y; 1297 mouse_col = y;
1296 state += 32; 1298 state += 32;
1297 } 1299 }
1298 1300
1299 button_number = MEvent.button - Button1; 1301 button_number = MEvent.button - Button1;
1300 /* add 0x3D for wheel events, like xterm does */ 1302 if (button_number > 10)
1303 return;
1304 else if (button_number >= 7)
1305 button_number += 128 - 7;
1301 if (button_number >= 3) 1306 else if (button_number >= 3)
1302 button_number += 64 - 3; 1307 button_number += 64 - 3;
1303 1308
1304 if (priv_modes & PrivMode_MouseX10) 1309 if (priv_modes & PrivMode_MouseX10)
1305 { 1310 {
1306 /* 1311 /*
1356 tt_printf ("\033[%d;%d;%dM", 1361 tt_printf ("\033[%d;%d;%dM",
1357 code, 1362 code,
1358 x, 1363 x,
1359 y); 1364 y);
1360 else if (priv_modes & PrivMode_ExtMouseUTF8) 1365 else if (priv_modes & PrivMode_ExtMouseUTF8)
1366 if (code < 128)
1361 tt_printf ("\033[M%c%lc%lc", 1367 tt_printf ("\033[M%c%lc%lc",
1362 code, 1368 code,
1363 wint_t (32 + x), 1369 wint_t (32 + x),
1364 wint_t (32 + y)); 1370 wint_t (32 + y));
1371 else
1372 tt_printf ("\033[M%c%c%lc%lc",
1373 0xc0 + (code >> 6),
1374 0x80 + (code & 0x3f),
1375 wint_t (32 + x),
1376 wint_t (32 + y));
1365 else 1377 else
1366#endif 1378#endif
1367 tt_printf ("\033[M%c%c%c", 1379 tt_printf ("\033[M%c%c%c",
1368 code, 1380 code,
1369 32 + x, 1381 32 + x,
2141 2153
2142 if (reportmode) 2154 if (reportmode)
2143 { 2155 {
2144 /* mouse report from vt window */ 2156 /* mouse report from vt window */
2145 /* don't report release of wheel "buttons" */ 2157 /* don't report release of wheel "buttons" */
2146 if (ev.button >= 4) 2158 if (ev.button >= 4 && ev.button <= 7)
2147 return; 2159 return;
2148#ifdef MOUSE_REPORT_DOUBLECLICK 2160#ifdef MOUSE_REPORT_DOUBLECLICK
2149 /* only report the release of 'slow' single clicks */ 2161 /* only report the release of 'slow' single clicks */
2150 if (MEvent.button != AnyButton 2162 if (MEvent.button != AnyButton
2151 && (ev.button != MEvent.button 2163 && (ev.button != MEvent.button
3019 case 7: /* unofficial extension */ 3031 case 7: /* unofficial extension */
3020 if (option (Opt_insecure)) 3032 if (option (Opt_insecure))
3021 tt_printf ("%-.250s\012", rs[Rs_display_name]); 3033 tt_printf ("%-.250s\012", rs[Rs_display_name]);
3022 break; 3034 break;
3023 case 8: /* unofficial extension */ 3035 case 8: /* unofficial extension */
3036 {
3037 string_term st;
3038 st.v[0] = CHAR_ST;
3039 st.v[1] = '\0';
3024 process_xterm_seq (XTerm_title, RESNAME "-" VERSION, CHAR_ST); 3040 process_xterm_seq (XTerm_title, (char *)RESNAME "-" VERSION, st); // char * cast verified
3025 break; 3041 break;
3042 }
3026 } 3043 }
3027 break; 3044 break;
3028 3045
3029 case CSI_TBC: /* 8.3.155: (0) TABULATION CLEAR */ 3046 case CSI_TBC: /* 8.3.155: (0) TABULATION CLEAR */
3030 switch (arg[0]) 3047 switch (arg[0])
3215/* 3232/*
3216 * get input up until STRING TERMINATOR (or BEL) 3233 * get input up until STRING TERMINATOR (or BEL)
3217 * ends_how is terminator used. returned input must be free()'d 3234 * ends_how is terminator used. returned input must be free()'d
3218 */ 3235 */
3219char * 3236char *
3220rxvt_term::get_to_st (unicode_t &ends_how) 3237rxvt_term::get_to_st (string_term &st)
3221{ 3238{
3222 unicode_t ch; 3239 unicode_t ch;
3223 bool seen_esc = false; 3240 bool seen_esc = false;
3224 unsigned int n = 0; 3241 unsigned int n = 0;
3225 wchar_t string[CBUFSIZ]; 3242 wchar_t string[CBUFSIZ];
3254 string[n++] = ch; 3271 string[n++] = ch;
3255 } 3272 }
3256 3273
3257 string[n++] = '\0'; 3274 string[n++] = '\0';
3258 3275
3259 ends_how = (ch == 0x5c ? C0_ESC : ch); 3276 n = 0;
3277 if (ch == 0x5c)
3278 st.v[n++] = C0_ESC;
3279 st.v[n++] = ch;
3280 st.v[n] = '\0';
3260 3281
3261 return rxvt_wcstombs (string); 3282 return rxvt_wcstombs (string);
3262} 3283}
3263 3284
3264/*----------------------------------------------------------------------*/ 3285/*----------------------------------------------------------------------*/
3270{ 3291{
3271 /* 3292 /*
3272 * Not handled yet 3293 * Not handled yet
3273 */ 3294 */
3274 3295
3275 unicode_t eh; 3296 string_term st;
3276 char *s = get_to_st (eh); 3297 char *s = get_to_st (st);
3277 if (s) 3298 if (s)
3278 free (s); 3299 free (s);
3279 3300
3280 return; 3301 return;
3281} 3302}
3293 for (arg = 0; isdigit (ch); ch = cmd_getc ()) 3314 for (arg = 0; isdigit (ch); ch = cmd_getc ())
3294 arg = arg * 10 + (ch - '0'); 3315 arg = arg * 10 + (ch - '0');
3295 3316
3296 if (ch == ';') 3317 if (ch == ';')
3297 { 3318 {
3298 unicode_t eh; 3319 string_term st;
3299 char *s = get_to_st (eh); 3320 char *s = get_to_st (st);
3300 3321
3301 if (s) 3322 if (s)
3302 { 3323 {
3303 process_xterm_seq (arg, s, eh); 3324 process_xterm_seq (arg, s, st);
3304 free (s); 3325 free (s);
3305 } 3326 }
3306 } 3327 }
3307} 3328}
3308 3329
3334 3355
3335 uint32_t color = (a << 24) | (r << 16) | (g << 8) | b; 3356 uint32_t color = (a << 24) | (r << 16) | (g << 8) | b;
3336 3357
3337 /* we allow one of the 6 closest neighbouring colours */ 3358 /* we allow one of the 6 closest neighbouring colours */
3338 /* to replace the current color, if they not used recently */ 3359 /* to replace the current color, if they not used recently */
3360 #if 0
3339 static const signed char dxyz[][3] = { 3361 static const unsigned char dxyz[][3] = {
3340 0, 0, 0, 3362 0, 0, 0,
3341 0, 0, 4, 3363 0, 0, 4,
3342 0, 4, 0,
3343 4, 0, 0,
3344 0, 4, 4, 3364 0, 4, 4,
3345 4, 4, 0, 3365 4, 4, 0,
3346 4, 0, 4, 3366 4, 0, 4,
3367 0, 4, 0,
3368 4, 0, 0,
3347 }; 3369 };
3370 #else
3371 // silly compressed verlapping triplets version of above
3372 static const unsigned char dxyz[] = {
3373 0, 0, 0, 4, 4, 0, 4, 0, 0,
3374 };
3375 #endif
3348 3376
3349 static const unsigned char color_level[8][32] = { 3377 static const unsigned char color_level[8][32] = {
3350 // neighbour index 3378 // neighbour index
3351 {0, 0, 1, 0, 0, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3}, 3379 {0, 0, 1, 0, 0, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3},
3352 {0, 1, 0, 1, 1, 2, 1, 1, 2, 2, 3, 3, 2, 2, 2, 3, 3, 3, 4, 4, 4, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4}, 3380 {0, 1, 0, 1, 1, 2, 1, 1, 2, 2, 3, 3, 2, 2, 2, 3, 3, 3, 4, 4, 4, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4},
3359 {0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6}, 3387 {0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6},
3360 }; 3388 };
3361 3389
3362 unsigned int idx; 3390 unsigned int idx;
3363 3391
3364 for (int n = 0; n < ecb_array_length (dxyz); ++n) 3392 for (int n = 0; n < ecb_array_length (dxyz) - 2; ++n)
3365 { 3393 {
3366 unsigned int idx_r = color_level[ Red_levels - dxyz[n][0]][r / 8]; 3394 unsigned int idx_r = color_level[ Red_levels - dxyz[n + 0]][r / 8];
3367 unsigned int idx_g = color_level[Green_levels - dxyz[n][1]][g / 8]; 3395 unsigned int idx_g = color_level[Green_levels - dxyz[n + 1]][g / 8];
3368 unsigned int idx_b = color_level[ Blue_levels - dxyz[n][2]][b / 8]; 3396 unsigned int idx_b = color_level[ Blue_levels - dxyz[n + 2]][b / 8];
3369 unsigned int index = colorcube_index (idx_r, idx_g, idx_b); 3397 unsigned int index = colorcube_index (idx_r, idx_g, idx_b);
3370 3398
3371 if (n == 0) 3399 if (n == 0)
3372 idx = index; 3400 idx = index;
3373 3401
3383 idx = index; 3411 idx = index;
3384 goto update; 3412 goto update;
3385 } 3413 }
3386 3414
3387 // like (rgb24_seqno[idx] > rgb24_seqno[index]) 3415 // like (rgb24_seqno[idx] > rgb24_seqno[index])
3388 // but also handles wrap around values good enough 3416 // but also handles wrap around values well enough
3389 if ((uint16_t)(rgb24_seqno[idx] - rgb24_seqno[index]) < 0x7fff) 3417 if ((uint16_t)(rgb24_seqno[idx] - rgb24_seqno[index]) < 0x8000)
3390 idx = index; 3418 idx = index;
3391 } 3419 }
3392 3420
3393update: 3421update:
3394 rgb24_color[idx] = color; 3422 rgb24_color[idx] = color;
3401 3429
3402 return idx; 3430 return idx;
3403} 3431}
3404 3432
3405void 3433void
3406rxvt_term::process_color_seq (int report, int color, const char *str, char resp) 3434rxvt_term::process_color_seq (int report, int color, const char *str, string_term &st)
3407{ 3435{
3408 if (str[0] == '?' && !str[1]) 3436 if (str[0] == '?' && !str[1])
3409 { 3437 {
3410 if (!IN_RANGE_INC (color, minCOLOR, maxTermCOLOR))
3411 return;
3412
3413 rgba c; 3438 rgba c;
3414 pix_colors_focused[color].get (c); 3439 pix_colors_focused[color].get (c);
3415 color -= minCOLOR; 3440 char rgba_str[32];
3416 3441
3417#if XFT 3442#if XFT
3418 if (c.a != rgba::MAX_CC) 3443 if (c.a != rgba::MAX_CC)
3419 tt_printf ("\033]%d;%d;rgba:%04x/%04x/%04x/%04x%c", report, color, c.r, c.g, c.b, c.a, resp); 3444 snprintf (rgba_str, sizeof (rgba_str), "rgba:%04x/%04x/%04x/%04x", c.r, c.g, c.b, c.a);
3420 else 3445 else
3421#endif 3446#endif
3422 tt_printf ("\033]%d;%d;rgb:%04x/%04x/%04x%c", report, color, c.r, c.g, c.b, resp); 3447 snprintf (rgba_str, sizeof (rgba_str), "rgb:%04x/%04x/%04x", c.r, c.g, c.b);
3448
3449 if (IN_RANGE_INC (color, minCOLOR, maxTermCOLOR))
3450 tt_printf ("\033]%d;%d;%s%s", report, color - minCOLOR, rgba_str, st.v);
3451 else
3452 tt_printf ("\033]%d;%s%s", report, rgba_str, st.v);
3423 } 3453 }
3424 else 3454 else
3425 set_window_color (color, str); 3455 set_window_color (color, str);
3426} 3456}
3427 3457
3428/* 3458/*
3429 * XTerm escape sequences: ESC ] Ps;Pt (ST|BEL) 3459 * XTerm escape sequences: ESC ] Ps;Pt (ST|BEL)
3430 */ 3460 */
3431void 3461void
3432rxvt_term::process_xterm_seq (int op, char *str, char resp) 3462rxvt_term::process_xterm_seq (int op, char *str, string_term &st)
3433{ 3463{
3434 int color; 3464 int color;
3435 char *buf, *name; 3465 char *buf, *name;
3436 bool query = str[0] == '?' && !str[1]; 3466 bool query = str[0] == '?' && !str[1];
3437 int saveop = op; 3467 int saveop = op;
3472 &nitems, &bytes_after, &value) == Success 3502 &nitems, &bytes_after, &value) == Success
3473 && actual_type != None 3503 && actual_type != None
3474 && actual_format == 8) 3504 && actual_format == 8)
3475 str = (const char *)(value); 3505 str = (const char *)(value);
3476 3506
3477 tt_printf ("\033]%d;%s%c", op, option (Opt_insecure) ? str : "", resp); 3507 tt_printf ("\033]%d;%s%s", op, option (Opt_insecure) ? str : "", st.v);
3478 3508
3479 XFree (value); 3509 XFree (value);
3480 } 3510 }
3481 else 3511 else
3482 { 3512 {
3506 break; 3536 break;
3507 3537
3508 if ((buf = strchr (name, ';')) != NULL) 3538 if ((buf = strchr (name, ';')) != NULL)
3509 *buf++ = '\0'; 3539 *buf++ = '\0';
3510 3540
3511 process_color_seq (op, color, name, resp); 3541 process_color_seq (op, color, name, st);
3512 } 3542 }
3513 break; 3543 break;
3514 case Rxvt_restoreFG: 3544 case Rxvt_restoreFG:
3515 case XTerm_Color00: 3545 case XTerm_Color00:
3516 process_color_seq (op, Color_fg, str, resp); 3546 process_color_seq (op, Color_fg, str, st);
3517 break; 3547 break;
3518 case Rxvt_restoreBG: 3548 case Rxvt_restoreBG:
3519 case XTerm_Color01: 3549 case XTerm_Color01:
3520 process_color_seq (op, Color_bg, str, resp); 3550 process_color_seq (op, Color_bg, str, st);
3521 break; 3551 break;
3522#ifndef NO_CURSORCOLOR 3552#ifndef NO_CURSORCOLOR
3523 case XTerm_Color_cursor: 3553 case XTerm_Color_cursor:
3524 process_color_seq (op, Color_cursor, str, resp); 3554 process_color_seq (op, Color_cursor, str, st);
3525 break; 3555 break;
3526#endif 3556#endif
3527 case XTerm_Color_pointer_fg: 3557 case XTerm_Color_pointer_fg:
3528 process_color_seq (op, Color_pointer_fg, str, resp); 3558 process_color_seq (op, Color_pointer_fg, str, st);
3529 break; 3559 break;
3530 case XTerm_Color_pointer_bg: 3560 case XTerm_Color_pointer_bg:
3531 process_color_seq (op, Color_pointer_bg, str, resp); 3561 process_color_seq (op, Color_pointer_bg, str, st);
3532 break; 3562 break;
3533#ifdef OPTION_HC 3563#ifdef OPTION_HC
3534 case XTerm_Color_HC: 3564 case XTerm_Color_HC:
3535 process_color_seq (op, Color_HC, str, resp); 3565 process_color_seq (op, Color_HC, str, st);
3536 break; 3566 break;
3537 case XTerm_Color_HTC: 3567 case XTerm_Color_HTC:
3538 process_color_seq (op, Color_HTC, str, resp); 3568 process_color_seq (op, Color_HTC, str, st);
3539 break; 3569 break;
3540#endif 3570#endif
3541#ifndef NO_BOLD_UNDERLINE_REVERSE 3571#ifndef NO_BOLD_UNDERLINE_REVERSE
3542 case URxvt_Color_BD: 3572 case URxvt_Color_BD:
3543 process_color_seq (op, Color_BD, str, resp); 3573 process_color_seq (op, Color_BD, str, st);
3544 break; 3574 break;
3545 case URxvt_Color_UL: 3575 case URxvt_Color_UL:
3546 process_color_seq (op, Color_UL, str, resp); 3576 process_color_seq (op, Color_UL, str, st);
3547 break; 3577 break;
3548 case URxvt_Color_IT: 3578 case URxvt_Color_IT:
3549 process_color_seq (op, Color_IT, str, resp); 3579 process_color_seq (op, Color_IT, str, st);
3550 break; 3580 break;
3551#endif 3581#endif
3552 case URxvt_Color_border: 3582 case URxvt_Color_border:
3553 process_color_seq (op, Color_border, str, resp); 3583 process_color_seq (op, Color_border, str, st);
3554 break; 3584 break;
3555 3585
3556 case XTerm_logfile: 3586 case XTerm_logfile:
3557 // TODO, when secure mode? 3587 // TODO, when secure mode?
3558 break; 3588 break;
3576 case URxvt_boldFont: 3606 case URxvt_boldFont:
3577 case URxvt_italicFont: 3607 case URxvt_italicFont:
3578 case URxvt_boldItalicFont: 3608 case URxvt_boldItalicFont:
3579#endif 3609#endif
3580 if (query) 3610 if (query)
3581 tt_printf ("\33]%d;%-.250s%c", saveop, 3611 tt_printf ("\33]%d;%-.250s%s", saveop,
3582 option (Opt_insecure) && fontset[op - URxvt_font]->fontdesc 3612 option (Opt_insecure) && fontset[op - URxvt_font]->fontdesc
3583 ? fontset[op - URxvt_font]->fontdesc : "", 3613 ? fontset[op - URxvt_font]->fontdesc : "",
3584 resp); 3614 st.v);
3585 else 3615 else
3586 { 3616 {
3587 const char *&res = rs[Rs_font + (op - URxvt_font)]; 3617 const char *&res = rs[Rs_font + (op - URxvt_font)];
3588 3618
3589 res = strdup (str); 3619 res = strdup (str);
3592 } 3622 }
3593 break; 3623 break;
3594 3624
3595 case URxvt_version: 3625 case URxvt_version:
3596 if (query) 3626 if (query)
3597 tt_printf ("\33]%d;rxvt-unicode;%-.20s;%c;%c%c", 3627 tt_printf ("\33]%d;rxvt-unicode;%-.20s;%c;%c%s",
3598 op, 3628 op,
3599 rs[Rs_name], VERSION[0], VERSION[2], 3629 rs[Rs_name], VERSION[0], VERSION[2],
3600 resp); 3630 st.v);
3601 break; 3631 break;
3602 3632
3603#if !ENABLE_MINIMAL 3633#if !ENABLE_MINIMAL
3634 case URxvt_cellinfo:
3635 if (query)
3636 tt_printf ("\33]%d;%d;%d;%d%s", saveop,
3637 fwidth, fheight, fbase,
3638 st.v);
3639 break;
3640
3604 case URxvt_locale: 3641 case URxvt_locale:
3605 if (query) 3642 if (query)
3606 tt_printf ("\33]%d;%-.250s%c", op, option (Opt_insecure) ? locale : "", resp); 3643 tt_printf ("\33]%d;%-.250s%s", op, option (Opt_insecure) ? locale : "", st.v);
3607 else 3644 else
3608 { 3645 {
3609 set_locale (str); 3646 set_locale (str);
3610 pty->set_utf8_mode (enc_utf8); 3647 pty->set_utf8_mode (enc_utf8);
3611 init_xlocale (); 3648 init_xlocale ();
3626 break; 3663 break;
3627#endif 3664#endif
3628 3665
3629#if ENABLE_PERL 3666#if ENABLE_PERL
3630 case URxvt_perl: 3667 case URxvt_perl:
3631 HOOK_INVOKE ((this, HOOK_OSC_SEQ_PERL, DT_STR, str, DT_STR_LEN, &resp, 1, DT_END)); 3668 HOOK_INVOKE ((this, HOOK_OSC_SEQ_PERL, DT_STR, str, DT_STR, st.v, DT_END));
3632 break; 3669 break;
3633#endif 3670#endif
3634 } 3671 }
3635} 3672}
3636/*----------------------------------------------------------------------*/ 3673/*----------------------------------------------------------------------*/
3731 // 1037 send DEL for keypad delete NYI 3768 // 1037 send DEL for keypad delete NYI
3732 { 1047, PrivMode_Screen }, 3769 { 1047, PrivMode_Screen },
3733 // 1048 save and restore cursor, implemented in code 3770 // 1048 save and restore cursor, implemented in code
3734 { 1049, PrivMode_Screen }, /* xterm extension, clear screen on ti rather than te */ 3771 { 1049, PrivMode_Screen }, /* xterm extension, clear screen on ti rather than te */
3735 // 1051, 1052, 1060, 1061 keyboard emulation NYI 3772 // 1051, 1052, 1060, 1061 keyboard emulation NYI
3773#if ENABLE_FRILLS
3736 { 2004, PrivMode_BracketPaste }, 3774 { 2004, PrivMode_BracketPaste },
3775#endif
3737 }; 3776 };
3738 3777
3739 if (nargs == 0) 3778 if (nargs == 0)
3740 return; 3779 return;
3741 3780

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines