neovim

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

commit 091b0859addc389698b21a470cb25068cf339ee4
parent cafd5cfca7754098ed4775d833cc10f07f21d859
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Fri, 21 Nov 2025 08:50:25 +0800

vim-patch:d128850: runtime(php): Update indent script to 1.76 (from 1.75)

fixes: vim/vim#18739 (editor hang on mixed syntax style)
closes: vim/vim#18758

https://github.com/vim/vim/commit/d1288503aa0099ab36802312c6dcf3e87751797a

Co-authored-by: John Wellesz <john.wellesz@gmail.com>

Diffstat:
Mruntime/indent/php.vim | 11++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/runtime/indent/php.vim b/runtime/indent/php.vim @@ -1,10 +1,9 @@ -" Vim indent file " Language: PHP " Author: John Wellesz <John.wellesz (AT) gmail (DOT) com> " URL: https://www.2072productions.com/vim/indent/php.vim " Home: https://github.com/2072/PHP-Indenting-for-VIm -" Last Change: 2023 August 18th -" Version: 1.75 +" Last Change: 2025 November 16th +" Version: 1.76 " " " Type :help php-indent for available options @@ -839,13 +838,15 @@ function! GetPhpIndent() continue else - let isSingleLineBlock = 0 - if getline(last_line_num) =~# '^\s*else\%(if\)\=\>' + if getline(last_line_num) =~# '^\s*else\%(if\)\=\>' && !isSingleLineBlock let last_line_num = FindTheIfOfAnElse(last_line_num, 0) + let isSingleLineBlock = 0 continue endif + let isSingleLineBlock = 0 + let last_match = last_line_num