0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00

runtime(lua): indent curly bracket followed by line comment (#12306)

fixes #12305
This commit is contained in:
champignoom 2023-08-21 02:49:16 +08:00 committed by GitHub
parent 16af913eee
commit 6633611f42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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