Groups
Groups
Sign in
Groups
Groups
vim_dev
Conversations
About
Send feedback
Help
Commit: runtime(lua): indent curly bracket followed by line comment (#12306)
1 view
Skip to first unread message
Christian Brabandt
unread,
Aug 20, 2023, 3:00:09 PM
8/20/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vim...@googlegroups.com
runtime(lua): indent curly bracket followed by line comment (#12306)
Commit:
https://github.com/vim/vim/commit/6633611f4280f33934c2ab9b6a3e84c04f054ad3
Author: champignoom <
66909116+c...@users.noreply.github.com
>
Date: Mon Aug 21 02:49:16 2023 +0800
runtime(lua): indent curly bracket followed by line comment (
https://github.com/vim/vim/issues/12306
)
fixes
https://github.com/vim/vim/issues/12305
diff --git a/runtime/indent/lua.vim b/runtime/indent/lua.vim
index 0d1f934a0..ff0f64be2 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
Reply all
Reply to author
Forward
0 new messages