diff --git a/runtime/autoload/tohtml.vim b/runtime/autoload/tohtml.vim
index 55399a788e..2f6baf355c 100644
--- a/runtime/autoload/tohtml.vim
+++ b/runtime/autoload/tohtml.vim
@@ -1,6 +1,6 @@
" Vim autoload file for the tohtml plugin.
" Maintainer: Ben Fritz
-" Last Change: 2010 Jul 29
+" Last Change: 2010 Aug 02
"
" Additional contributors:
"
@@ -14,9 +14,9 @@ let s:cpo_sav = &cpo
set cpo-=C
func! tohtml#Convert2HTML(line1, line2)
- let old_vals = tohtml#OverrideUserSettings()
+ let s:settings = tohtml#GetUserSettings()
- if !&diff || exists("g:html_diff_one_file")
+ if !&diff || s:settings.diff_one_file
if a:line2 >= a:line1
let g:html_start_line = a:line1
let g:html_end_line = a:line2
@@ -29,8 +29,7 @@ func! tohtml#Convert2HTML(line1, line2)
let win_list = []
let buf_list = []
windo | if &diff | call add(win_list, winbufnr(0)) | endif
- let save_hwf = exists("g:html_whole_filler")
- let g:html_whole_filler = 1
+ let s:settings.whole_filler = 1
let g:html_diff_win_num = 0
for window in win_list
exe ":" . bufwinnr(window) . "wincmd w"
@@ -41,16 +40,12 @@ func! tohtml#Convert2HTML(line1, line2)
call add(buf_list, bufnr('%'))
endfor
unlet g:html_diff_win_num
- if !save_hwf
- unlet g:html_whole_filler
- endif
call tohtml#Diff2HTML(win_list, buf_list)
endif
- call tohtml#RestoreUserSettings(old_vals)
-
unlet g:html_start_line
unlet g:html_end_line
+ unlet s:settings
endfunc
func! tohtml#Diff2HTML(win_list, buf_list)
@@ -175,7 +170,7 @@ func! tohtml#Diff2HTML(win_list, buf_list)
" Insert javascript to toggle matching folds open and closed in all windows,
" if dynamic folding is active.
- if exists("g:html_dynamic_folds")
+ if s:settings.dynamic_folds
call append(style_start, [
\ "