To: vim_dev@googlegroups.com Subject: Patch 8.2.5151 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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ü(\=" + 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 -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///