diff options
author | champignoom <66909116+champignoom@users.noreply.github.com> | 2023-08-21 02:49:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-20 20:49:16 +0200 |
commit | 6633611f4280f33934c2ab9b6a3e84c04f054ad3 (patch) | |
tree | b9dc557c948e7c6ff7b61994f2e690e898d7ae4a /runtime | |
parent | 16af913eeefb288ce968fb87e09a597413861900 (diff) |
runtime(lua): indent curly bracket followed by line comment (#12306)
fixes #12305
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/indent/lua.vim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/indent/lua.vim b/runtime/indent/lua.vim index 0d1f934a03..ff0f64be29 100644 --- a/runtime/indent/lua.vim +++ b/runtime/indent/lua.vim @@ -41,7 +41,7 @@ function! GetLuaIndent() let prevline = getline(prevlnum) let midx = match(prevline, '^\s*\%(if\>\|for\>\|while\>\|repeat\>\|else\>\|elseif\>\|do\>\|then\>\)') if midx == -1 - let midx = match(prevline, '{\s*$') + let midx = match(prevline, '{\s*\%(--\%([^[].*\)\?\)\?$') if midx == -1 let midx = match(prevline, '\<function\>\s*\%(\k\|[.:]\)\{-}\s*(') endif |