Patch 8.2.5151
Problem:    Reading beyond the end of the line with lisp indenting.
Solution:   Avoid going over the NUL at the end of the line.
Files:      src/indent.c, src/testdir/test_lispwords.vim


*** ../vim-8.2.5150/src/indent.c        2022-06-18 12:51:08.146916429 +0100
--- src/indent.c        2022-06-22 19:57:42.226948929 +0100
***************
*** 2076,2083 ****
                    amount += 2;
                else
                {
!                   that++;
!                   amount++;
                    firsttry = amount;
  
                    while (VIM_ISWHITE(*that))
--- 2076,2086 ----
                    amount += 2;
                else
                {
!                   if (*that != NUL)
!                   {
!                       that++;
!                       amount++;
!                   }
                    firsttry = amount;
  
                    while (VIM_ISWHITE(*that))
*** ../vim-8.2.5150/src/testdir/test_lispwords.vim      2020-03-06 
19:35:46.120669845 +0000
--- src/testdir/test_lispwords.vim      2022-06-22 19:37:56.279617389 +0100
***************
*** 1,4 ****
! " Tests for 'lispwords' settings being global-local
  
  set nocompatible viminfo+=nviminfo
  
--- 1,5 ----
! " Tests for 'lispwords' settings being global-local.
! " And  other lisp indent stuff.
  
  set nocompatible viminfo+=nviminfo
  
***************
*** 85,88 ****
--- 86,98 ----
    set nolisp
  endfunc
  
+ func Test_lisp_indent_works()
+   " This was reading beyond the end of the line
+   new
+   exe "norm a\tü(\<CR>="
+   set lisp
+   norm ==
+   bwipe!
+ endfunc
+ 
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.5150/src/version.c       2022-06-22 19:08:34.241960947 +0100
--- src/version.c       2022-06-22 19:39:06.043231091 +0100
***************
*** 736,737 ****
--- 736,739 ----
  {   /* Add new patch number below this line */
+ /**/
+     5151,
  /**/

-- 
The budget process was invented by an alien race of sadistic beings who
resemble large cats.
                                (Scott Adams - The Dilbert principle)

 /// 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/20220622190038.8CB691C0A8A%40moolenaar.net.

Raspunde prin e-mail lui