From de74ed35aff7ce5586a5fcefda415942108eb4ac Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 17 Oct 2024 07:30:49 +0800 Subject: vim-patch:4bfb899: runtime(help): fix end of sentence highlight in code examples closes: vim/vim#15745 https://github.com/vim/vim/commit/4bfb89996f227d5fbb4803f0d8dbd3105483b625 Co-authored-by: Christian Brabandt Co-authored-by: Danilo Rezende --- runtime/doc/repeat.txt | 6 +++--- runtime/syntax/help.vim | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index 49679213e2..abeefb980e 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -979,9 +979,9 @@ For example, to profile the one_script.vim script file: > clear the profiling statistics and start profiling again. :prof[ile] pause - Don't profile until the following `:profile continue`. Can be - used when doing something that should not be counted (e.g., an - external command). Does not nest. + Stop profiling until the next `:profile continue` command. + Can be used when doing something that should not be counted + (e.g., an external command). Does not nest. :prof[ile] continue Continue profiling after `:profile pause`. diff --git a/runtime/syntax/help.vim b/runtime/syntax/help.vim index bccbacaeec..dc892a7d60 100644 --- a/runtime/syntax/help.vim +++ b/runtime/syntax/help.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Vim help file " Maintainer: The Vim Project -" Last Change: 2024 Oct 08 +" Last Change: 2024 Oct 16 " Former Maintainer: Bram Moolenaar " Quit when a (custom) syntax file was already loaded @@ -43,7 +43,8 @@ syn match helpOption "'[a-z]\{2,\}'" syn match helpOption "'t_..'" syn match helpNormal "'ab'" syn match helpCommand "`[^` \t]\+`"hs=s+1,he=e-1 contains=helpBacktick -syn match helpCommand "\(^\|[^a-z"[]\)\zs`[^`]\+`\ze\([^a-z\t."']\|$\)"hs=s+1,he=e-1 contains=helpBacktick +" doesn't allow a . directly after an ending backtick. See :helpgrep `[^`,]\+ [^`,]\+`\. +syn match helpCommand "\(^\|[^a-z"[]\)\zs`[^`]\+`\ze\([^a-z\t."']\|[.?!]\?$\)"hs=s+1,he=e-1 contains=helpBacktick syn match helpHeader "\s*\zs.\{-}\ze\s\=\~$" nextgroup=helpIgnore syn match helpGraphic ".* \ze`$" nextgroup=helpIgnore if has("conceal") -- cgit