vim-patch:58ed368: runtime(org): Fix escape in formatlistpat (#41782)

The regex atom \| needs an extra escape for a :set command

closes: vim/vim#21214

58ed368ab9

Co-authored-by: SPFab <42518661+SPFabGerman@users.noreply.github.com>
This commit is contained in:
zeertzjq
2026-09-08 22:28:46 +08:00
committed by GitHub
parent bea6410138
commit 94636bdff0

View File

@@ -3,6 +3,7 @@
" Previous Maintainer: Luca Saccarola <github.e41mv@aleeas.com>
" Maintainer: This runtime file is looking for a new maintainer.
" Last Change: 2025 Aug 05
" 2026 Sep 07 by Vim project: fix escape in formatlistpat
if exists("b:did_ftplugin")
@@ -20,7 +21,7 @@ setl commentstring=#\ %s
setl comments=fb:*,fb:-,fb:+,b:#,b:\:
setl formatoptions+=nql
setl formatlistpat=^\\s*\\(\\(\\d\\|\\a\\)\\+[.)]\\|[+-]\\)\\s\\+
setl formatlistpat=^\\s*\\(\\(\\d\\\|\\a\\)\\+[.)]\\\|[+-]\\)\\s\\+
function OrgFoldExpr()
let l:depth = match(getline(v:lnum), '\(^\*\+\)\@<=\( .*$\)\@=')