Skip to content

Commit

Permalink
Don't overwrite option if set by user / already exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
wting committed Jul 24, 2015
1 parent d4a1ada commit 9e444bc
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions plugin/gitsessions.vim
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,21 @@ if !exists('g:gitsessions_dir')
let g:gitsessions_dir = 'sessions'
else
let g:gitsessions_dir = s:rtrim_slashes(g:gitsessions_dir)

endif

" used to control auto-save behavior
if !exists('s:session_exist')
let s:session_exist = 0
endif

" Cache session file
" Pros: performance gain (x100) on large repositories
" Cons: switch between git branches will be missed from GitSessionUpdate()
" You are advised to save it manually by calling to GitSessionSave()
" Default - cache disabled
let g:gitsessions_use_cache = 0
if !exists('g:gitsessions_use_cache')
let g:gitsessions_use_cache = 0
endif

" used to control auto-save behavior
if !exists('s:session_exist')
let s:session_exist = 0
endif

" HELPER FUNCTIONS

Expand Down

0 comments on commit 9e444bc

Please sign in to comment.