Patch 8.2.3482
Problem: Reading beyond end of line ending in quote and backslash.
Solution: Check for non-NUL after backslash. (closes #8964)
Files: src/cindent.c, src/testdir/test_cindent.vim
*** ../vim-8.2.3481/src/cindent.c 2021-07-27 21:00:39.737712414 +0100
--- src/cindent.c 2021-10-05 21:51:36.499208231 +0100
***************
*** 82,91 ****
{
if (p[0] == '\'') // 'c' or '\n' or '\000'
{
! if (!p[1]) // ' at end of line
break;
i = 2;
! if (p[1] == '\\') // '\n' or '\000'
{
++i;
while (vim_isdigit(p[i - 1])) // '\000'
--- 82,91 ----
{
if (p[0] == '\'') // 'c' or '\n' or '\000'
{
! if (p[1] == NUL) // ' at end of line
break;
i = 2;
! if (p[1] == '\\' && p[2] != NUL) // '\n' or '\000'
{
++i;
while (vim_isdigit(p[i - 1])) // '\000'
*** ../vim-8.2.3481/src/testdir/test_cindent.vim 2020-08-12
17:50:31.871655841 +0100
--- src/testdir/test_cindent.vim 2021-10-05 21:50:50.054588333 +0100
***************
*** 5307,5310 ****
--- 5307,5317 ----
enew! | close
endfunc
+ func Test_backslash_at_end_of_line()
+ new
+ exe "norm v>O'\\\<C-m>-"
+ exe "norm \<C-q>="
+ bwipe!
+ endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.3481/src/version.c 2021-10-05 19:44:00.859799210 +0100
--- src/version.c 2021-10-05 21:48:05.752374508 +0100
***************
*** 759,760 ****
--- 759,762 ----
{ /* Add new patch number below this line */
+ /**/
+ 3482,
/**/
--
hundred-and-one symptoms of being an internet addict:
106. When told to "go to your room" you inform your parents that you
can't...because you were kicked out and banned.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20211005205946.238E2C80054%40pakwach.moolenaar.net.