* src/keyboard.c (echo_truncate): Don't call Ftruncate if the echo
message is already shorter than NCHARS. (Bug#27040)
static void
echo_truncate (ptrdiff_t nchars)
{
- if (STRINGP (KVAR (current_kboard, echo_string)))
+ Lisp_Object es = KVAR (current_kboard, echo_string);
+ if (STRINGP (es) && SCHARS (es) > nchars)
kset_echo_string (current_kboard,
Fsubstring (KVAR (current_kboard, echo_string),
make_number (0), make_number (nchars)));