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
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15

View File

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