From b8058a4b13f71e9254d379e2151e6c6b5f4ff82c Mon Sep 17 00:00:00 2001 From: Jake Zimmerman Date: Thu, 17 Apr 2025 15:30:13 -0700 Subject: [PATCH 1/2] Don't `set cpo&vim` if we're going to early exit This was a bad merge that resulted from #393 being opened before #397 but landing after. If we override the `&cpo` option and then `finish`, it will never get set back to the saved cpo. Instead, let's just only do the `set` if we're sure we're not going to early exit. --- syntax/pandoc.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/syntax/pandoc.vim b/syntax/pandoc.vim index cf14ff6..d22101d 100644 --- a/syntax/pandoc.vim +++ b/syntax/pandoc.vim @@ -12,13 +12,13 @@ scriptencoding utf-8 " Version: 5.0 " Last Change: 2024 Apr 08 -let s:cpo_save = &cpo -set cpo&vim - if exists('b:current_syntax') finish endif +let s:cpo_save = &cpo +set cpo&vim + " Configuration: {{{1 " " use conceal? {{{2 From 2bcdcd5cb65928f435079994eaac2bec7f80b1ef Mon Sep 17 00:00:00 2001 From: Jake Zimmerman Date: Thu, 17 Apr 2025 15:35:16 -0700 Subject: [PATCH 2/2] Fix vint This also regressed in #393, but we may as well fix it here. --- syntax/pandoc.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/syntax/pandoc.vim b/syntax/pandoc.vim index d22101d..04e24a6 100644 --- a/syntax/pandoc.vim +++ b/syntax/pandoc.vim @@ -16,8 +16,8 @@ if exists('b:current_syntax') finish endif -let s:cpo_save = &cpo -set cpo&vim +let s:cpo_save = &cpoptions +set cpoptions&vim " Configuration: {{{1 " @@ -745,7 +745,7 @@ let b:current_syntax = 'pandoc' syntax sync clear syntax sync minlines=1000 -let &cpo = s:cpo_save +let &cpoptions = s:cpo_save unlet s:cpo_save " vim: set fdm=marker foldlevel=0: