Commit: runtime(org): Fix escape in formatlistpat

1 view
Skip to first unread message

Christian Brabandt

unread,
Sep 7, 2026, 3:00:18 PM (3 days ago) Sep 7
to vim...@googlegroups.com
runtime(org): Fix escape in formatlistpat

Commit: https://github.com/vim/vim/commit/58ed368ab9645b527d388a5c4dbbc8e8bc6e7193
Author: SPFab <42518661+S...@users.noreply.github.com>
Date: Mon Sep 7 18:43:38 2026 +0000

runtime(org): Fix escape in formatlistpat

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

closes: #21214

Signed-off-by: SPFab <42518661+S...@users.noreply.github.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/ftplugin/org.vim b/runtime/ftplugin/org.vim
index 4eb8a60e0..6d291957f 100644
--- a/runtime/ftplugin/org.vim
+++ b/runtime/ftplugin/org.vim
@@ -3,6 +3,7 @@
" Previous Maintainer: Luca Saccarola <github...@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), '\(^\*\+\)\@<=\( .*$\)\@=')
Reply all
Reply to author
Forward
0 new messages