neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 3f877657dd1be891bdf6b5fa79d92319b720426d
parent abc3721e4fce2ddacc7fc51f729637f87819efbd
Author: Christian Clason <c.clason@uni-graz.at>
Date:   Mon, 21 Aug 2023 09:51:59 +0900

vim-patch:6633611f4280

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

fixes vim/vim#12305

https://github.com/vim/vim/commit/6633611f4280f33934c2ab9b6a3e84c04f054ad3

Co-authored-by: champignoom <66909116+champignoom@users.noreply.github.com>

Diffstat:
Mruntime/indent/lua.vim | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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