To: vim_dev@googlegroups.com Subject: Patch 8.2.4436 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4436 Problem: Crash with weird 'vartabstop' value. Solution: Check for running into the end of the line. Files: src/indent.c, src/testdir/test_vartabs.vim *** ../vim-8.2.4435/src/indent.c 2022-02-12 21:59:47.800290197 +0000 --- src/indent.c 2022-02-21 19:33:31.367399886 +0000 *************** *** 1338,1343 **** --- 1338,1345 ---- new_cursor_col += (*mb_ptr2len)(ptr + new_cursor_col); else ++new_cursor_col; + if (ptr[new_cursor_col] == NUL) + break; vcol += lbr_chartabsize(ptr, ptr + new_cursor_col, (colnr_T)vcol); } vcol = last_vcol; *** ../vim-8.2.4435/src/testdir/test_vartabs.vim 2022-02-05 11:12:59.962281668 +0000 --- src/testdir/test_vartabs.vim 2022-02-21 19:33:00.307481880 +0000 *************** *** 442,445 **** --- 442,457 ---- setlocal shiftwidth& vartabstop& tabstop& endfunc + func Test_vartabstop_latin1() + let save_encoding = &encoding + new + set encoding=iso8859 + silent norm :se  + set vartabstop=400 + norm i00  + bwipe! + let &encoding = save_encoding + endfunc + + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.4435/src/version.c 2022-02-21 18:34:25.874252449 +0000 --- src/version.c 2022-02-21 19:28:39.336233694 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4436, /**/ -- From "know your smileys": :-O>-o Smiley American tourist (note big mouth and camera) /// 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 ///