Avoid args-out-of-range errors on fringe clicks after "C-h k"
* src/keyboard.c (echo_truncate): Don't call Ftruncate if the echo message is already shorter than NCHARS. (Bug#27040)
This commit is contained in:
parent
4b17214aab
commit
3fc36f427a
1 changed files with 2 additions and 1 deletions
|
@ -634,7 +634,8 @@ echo_length (void)
|
|||
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)));
|
||||
|
|
Loading…
Add table
Reference in a new issue