startup time for new terms in rxvtd. At least xfree86 4.3 is
rather broken with respect to input methods, though, so expect
crashes when you kill your input method (xterm et al. also crash).
- - fix bugs in x flushing, causing an empty screen after startup
+ - fix bugs in X flushing, causing an empty screen after startup.
- fix various memleaks in rxvtd.
- fix a bug that kept escape codes to be generated for some
keysyms that also have string translations, when not --enable-xim.
if (status_return == XLookupChars
|| status_return == XLookupBoth)
{
- wkbuf[len] = 0;
- len = wcstombs ((char *)kbuf, wkbuf, KBUFSZ);
- if (len < 0)
- len = 0;
+ /* make sure the user can type ctrl-@, i.e. NUL */
+ if (len == 1 && *wkbuf == 0)
+ {
+ kbuf[0] = 0;
+ len = 1;
+ }
+ else
+ {
+ wkbuf[len] = 0;
+ len = wcstombs ((char *)kbuf, wkbuf, KBUFSZ);
+ if (len < 0)
+ len = 0;
+ }
}
else
len = 0;
/* escape prefix */
if (meta
#ifdef META8_OPTION
- && (meta_char == C0_ESC)
+ && meta_char == C0_ESC
#endif
)
{
const unsigned char ch = C0_ESC;
-
tt_write (&ch, 1);
}
-#ifdef DEBUG_CMD
- if (debug_key)
- { /* Display keyboard buffer contents */
- char *p;
- int i;
-
- fprintf (stderr, "key 0x%04X [%d]: `", (unsigned int)keysym, len);
- for (i = 0, p = kbuf; i < len; i++, p++)
- fprintf (stderr, (*p >= ' ' && *p < '\177' ? "%c" : "\\%03o"), *p);
- fprintf (stderr, "'\n");
- }
+
+#if defined(DEBUG_CMD)
+ /* Display keyboard buffer contents */
+ unsigned char *p;
+ int i;
+
+ fprintf (stderr, "key 0x%04X [%d]: `", (unsigned int)keysym, len);
+ for (i = 0, p = kbuf; i < len; i++, p++)
+ fprintf (stderr, (*p >= ' ' && *p < '\177' ? "%c" : "\\%03o"), *p);
+ fprintf (stderr, "'\n");
#endif /* DEBUG_CMD */
tt_write (kbuf, (unsigned int)len);
}