diff src/indent.c @ 30805:4edfa418f8ba v9.0.0737

patch 9.0.0737: Lisp word only recognized when a space follows Commit: https://github.com/vim/vim/commit/d26c5805bcbd630dab0478c2d22503a6e32a83c1 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Oct 13 12:30:08 2022 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Thu, 13 Oct 2022 13:45:06 +0200
parents 33a3f63785db
children 40df8a6515f6
line wrap: on
line diff
--- a/src/indent.c
+++ b/src/indent.c
@@ -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;