summaryrefslogtreecommitdiffstats
path: root/runtime/indent
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-10-16 13:11:12 +0100
committerBram Moolenaar <Bram@vim.org>2022-10-16 13:11:12 +0100
commit3c053a1a5ad2a3c924929e11f2b9af20a8b901e2 (patch)
tree75889d295e175ede0f7a1812c8b4462172e3be86 /runtime/indent
parentbd053f894b0d7652928201faa68c53d1ce2acdc5 (diff)
Update runtime files
Diffstat (limited to 'runtime/indent')
-rw-r--r--runtime/indent/testdir/vim.in18
-rw-r--r--runtime/indent/testdir/vim.ok20
-rw-r--r--runtime/indent/vim.vim4
3 files changed, 39 insertions, 3 deletions
diff --git a/runtime/indent/testdir/vim.in b/runtime/indent/testdir/vim.in
index 87c044a9bd..55acf6fde1 100644
--- a/runtime/indent/testdir/vim.in
+++ b/runtime/indent/testdir/vim.in
@@ -869,3 +869,21 @@ echo
})
enddef
" END_INDENT
+
+" START_INDENT
+echo {
+k: () => {
+if true
+echo
+popup_setoptions(id,
+{title: 'title'})
+endif
+}
+}
+" END_INDENT
+
+" START_INDENT
+if true
+elseif
+endif
+" END_INDENT
diff --git a/runtime/indent/testdir/vim.ok b/runtime/indent/testdir/vim.ok
index 2326934f96..c6ba084305 100644
--- a/runtime/indent/testdir/vim.ok
+++ b/runtime/indent/testdir/vim.ok
@@ -849,7 +849,7 @@ endfor
echo []
+ []
+ [{a: 1,
- b: 2}]
+ b: 2}]
}
" END_INDENT
@@ -869,3 +869,21 @@ def Foo()
})
enddef
" END_INDENT
+
+" START_INDENT
+echo {
+ k: () => {
+ if true
+ echo
+ popup_setoptions(id,
+ {title: 'title'})
+ endif
+ }
+}
+" END_INDENT
+
+" START_INDENT
+if true
+elseif
+endif
+" END_INDENT
diff --git a/runtime/indent/vim.vim b/runtime/indent/vim.vim
index 2f59dfc867..2cb32372d6 100644
--- a/runtime/indent/vim.vim
+++ b/runtime/indent/vim.vim
@@ -3,7 +3,7 @@ vim9script
# Vim indent file
# Language: Vim script
# Maintainer: Bram Moolenaar <Bram@vim.org>
-# Last Change: 2022 Sep 27
+# Last Change: 2022 Oct 5
# Only load this indent file when no other was loaded.
if exists('b:did_indent')
@@ -15,7 +15,7 @@ b:undo_indent = 'setlocal indentkeys< indentexpr<'
import autoload '../autoload/dist/vimindent.vim'
-setlocal indentexpr=vimindent.Expr(v:lnum)
+setlocal indentexpr=vimindent.Expr()
setlocal indentkeys+==endif,=enddef,=endfu,=endfor,=endwh,=endtry,=},=else,=cat,=finall,=END,0\\
execute('setlocal indentkeys+=0=\"\\\ ,0=#\\\ ')
setlocal indentkeys-=0#