From 32ced1f08fd551770b4f4a0fd69dfe2d36c417b6 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 15 Oct 2022 19:42:38 +0800 Subject: vim-patch:9.0.0754: 'indentexpr' overrules lisp indenting in one situation Problem: 'indentexpr' overrules lisp indenting in one situation. Solution: Add "else" to keep the lisp indent. (issue vim/vim#11327) https://github.com/vim/vim/commit/a79b35b5781ae770334cec781d17fec3875f8108 --- src/nvim/testdir/test_lispindent.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_lispindent.vim b/src/nvim/testdir/test_lispindent.vim index d4cab6d17e..8987f67a80 100644 --- a/src/nvim/testdir/test_lispindent.vim +++ b/src/nvim/testdir/test_lispindent.vim @@ -91,6 +91,17 @@ func Test_lispindent_negative() call assert_equal(-1, lispindent(-1)) endfunc +func Test_lispindent_with_indentexpr() + enew + setl ai lisp nocin indentexpr=11 + exe "normal a(x\1\2)\" + let expected = ['(x', ' 1', ' 2)'] + call assert_equal(expected, getline(1, 3)) + normal 1G=G + call assert_equal(expected, getline(1, 3)) + bwipe! +endfunc + func Test_lisp_indent_works() " This was reading beyond the end of the line new -- cgit