0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

patch 9.0.0737: Lisp word only recognized when a space follows

Problem:    Lisp word only recognized when a space follows.
Solution:   Also match a word at the end of a line.  Rename the test.  Use a
            compiled function to avoid backslashes.
This commit is contained in:
Bram Moolenaar
2022-10-13 12:30:08 +01:00
parent f8412c9d7c
commit d26c5805bc
7 changed files with 109 additions and 102 deletions

View File

@@ -1952,7 +1952,7 @@ lisp_match(char_u *p)
{
(void)copy_option_part(&word, buf, LSIZE, ",");
len = (int)STRLEN(buf);
if (STRNCMP(buf, p, len) == 0 && p[len] == ' ')
if (STRNCMP(buf, p, len) == 0 && IS_WHITE_OR_NUL(p[len]))
return TRUE;
}
return FALSE;