aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMichael Henry2023-07-15 18:19:35 -0400
committerMichael Henry2023-07-15 18:19:35 -0400
commitf1a2b031b31f9e3a75b9746b3a6638ab1b497497 (patch)
treedd4d84af34c0f27d5251fb1a42d9df7601b13d4e
parent8b4a9523632049b3b373de1233bef346073b8982 (diff)
downloadctrlp.vim-f1a2b031b31f9e3a75b9746b3a6638ab1b497497.tar.gz

Ensure the ‘cst’ option is available before referencing it.

Note that in Neovim the ‘cst’ (‘cscopetag’) option has been removed.

-rw-r--r--autoload/ctrlp/tag.vim10
1 files changed, 7 insertions, 3 deletions
diff --git a/autoload/ctrlp/tag.vim b/autoload/ctrlp/tag.vim
index c229480..383f64a 100644
--- a/autoload/ctrlp/tag.vim
+++ b/autoload/ctrlp/tag.vim
@@ -116,10 +116,14 @@ fu! ctrlp#tag#accept(mode, str)
if cmd != ''
exe cmd
en
- let save_cst = &cst
- set cst&
+ if exists('&cst')
+ let save_cst = &cst
+ set cst&
+ en
cal feedkeys(":".( utg ? fdcnt[2] : "" )."ta ".tg."\r", 'nt')
- let &cst = save_cst
+ if exists('&cst')
+ let &cst = save_cst
+ en
el
let ext = ""
if fdcnt[1] < 2 && fdcnt[2]