fixup! man.vim: Refactor verify_exists to unset $MANSECT as needed

":unset" is not a valid Ex command.
Use setenv() to set/unset environment variables.
This commit is contained in:
Jan Edmund Lazo
2021-04-23 01:23:43 -04:00
parent b1fed1ada9
commit ecb48e7f8a

View File

@@ -252,11 +252,11 @@ function! s:verify_exists(sect, name) abort
if !empty($MANSECT) if !empty($MANSECT)
try try
let MANSECT = $MANSECT let MANSECT = $MANSECT
unset $MANSECT call setenv('MANSECT', v:null)
return s:get_path('', a:name) return s:get_path('', a:name)
catch /^command error (/ catch /^command error (/
finally finally
let $MANSECT = MANSECT call setenv('MANSECT', MANSECT)
endtry endtry
endif endif