Don't clobber foldmethod in :Gedit :

Being a window local option, this can be pretty annoying.
This commit is contained in:
Tim Pope
2013-01-13 16:01:17 -05:00
parent b9525df190
commit 1601ffc1e0

View File

@@ -646,6 +646,7 @@ call s:command("-bar Gstatus :execute s:Status()")
function! s:Status() abort function! s:Status() abort
try try
Gpedit : Gpedit :
set foldmethod=syntax foldlevel=1
wincmd P wincmd P
nnoremap <buffer> <silent> q :<C-U>bdelete<CR> nnoremap <buffer> <silent> q :<C-U>bdelete<CR>
catch /^fugitive:/ catch /^fugitive:/
@@ -2027,7 +2028,7 @@ function! s:BufReadIndex()
execute cd.'`=dir`' execute cd.'`=dir`'
endtry endtry
set ft=gitcommit set ft=gitcommit
set foldtext=fugitive#foldtext() foldmethod=syntax foldlevel=1 set foldtext=fugitive#foldtext()
endif endif
setlocal ro noma nomod noswapfile setlocal ro noma nomod noswapfile
if &bufhidden ==# '' if &bufhidden ==# ''