mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-11 04:53:45 -05:00
Don't clobber foldmethod in :Gedit :
Being a window local option, this can be pretty annoying.
This commit is contained in:
@@ -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 ==# ''
|
||||||
|
|||||||
Reference in New Issue
Block a user