aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index c9fa2a9f5e1..55486c6d9ab 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -634,7 +634,8 @@ echo_length (void)
634static void 634static void
635echo_truncate (ptrdiff_t nchars) 635echo_truncate (ptrdiff_t nchars)
636{ 636{
637 if (STRINGP (KVAR (current_kboard, echo_string))) 637 Lisp_Object es = KVAR (current_kboard, echo_string);
638 if (STRINGP (es) && SCHARS (es) > nchars)
638 kset_echo_string (current_kboard, 639 kset_echo_string (current_kboard,
639 Fsubstring (KVAR (current_kboard, echo_string), 640 Fsubstring (KVAR (current_kboard, echo_string),
640 make_number (0), make_number (nchars))); 641 make_number (0), make_number (nchars)));