aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_lispindent.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-10-15 19:42:38 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-10-15 19:44:03 +0800
commit32ced1f08fd551770b4f4a0fd69dfe2d36c417b6 (patch)
treebf58e72746b37c0204aaacc3e666d1ff6f93da95 /src/nvim/testdir/test_lispindent.vim
parenteaac0958256f2fb3b0fa9d20790bc38ed9eb3005 (diff)
downloadrneovim-32ced1f08fd551770b4f4a0fd69dfe2d36c417b6.tar.gz
rneovim-32ced1f08fd551770b4f4a0fd69dfe2d36c417b6.tar.bz2
rneovim-32ced1f08fd551770b4f4a0fd69dfe2d36c417b6.zip
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
Diffstat (limited to 'src/nvim/testdir/test_lispindent.vim')
-rw-r--r--src/nvim/testdir/test_lispindent.vim11
1 files changed, 11 insertions, 0 deletions
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\<CR>1\<CR>2)\<Esc>"
+ 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