From 00443e2b580314b0cdb2bc2be746c44e75030074 Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Thu, 18 May 2017 22:07:17 -0700 Subject: [PATCH] backup and restore wildignore to prevent conflicts with expand(), fixes #50 --- plugin/wakatime.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugin/wakatime.vim b/plugin/wakatime.vim index 50634b5..f5cd4a0 100644 --- a/plugin/wakatime.vim +++ b/plugin/wakatime.vim @@ -31,6 +31,12 @@ let s:VERSION = '5.0.1' let s:old_cpo = &cpo set cpo&vim + " Backup wildignore before clearing it to prevent conflicts with expand() + let s:wildignore = &wildignore + if s:wildignore != "" + set wildignore="" + endif + " Script Globals let s:home = expand("$WAKATIME_HOME") if s:home == '$WAKATIME_HOME' @@ -474,5 +480,10 @@ let s:VERSION = '5.0.1' " }}} +" Restore wildignore option +if s:wildignore != "" + let &wildignore=s:wildignore +endif + " Restore cpoptions let &cpo = s:old_cpo