mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 11:33:47 -05:00
Standardize method for disabling foldmethod=marker
The foldmarker option does appear to be buffer local (despite being documented as window local), so it should be safe to use this everywhere.
This commit is contained in:
@@ -2261,8 +2261,8 @@ function! fugitive#BufReadCmd(...) abort
|
|||||||
setlocal endofline
|
setlocal endofline
|
||||||
|
|
||||||
try
|
try
|
||||||
if &foldmethod ==# 'marker' && b:fugitive_type !=# 'blob'
|
if b:fugitive_type !=# 'blob'
|
||||||
setlocal foldmethod=manual
|
setlocal foldmarker=<<<<<<<<,>>>>>>>>
|
||||||
endif
|
endif
|
||||||
silent exe s:DoAutocmd('BufReadPre')
|
silent exe s:DoAutocmd('BufReadPre')
|
||||||
if b:fugitive_type ==# 'tree'
|
if b:fugitive_type ==# 'tree'
|
||||||
@@ -2405,7 +2405,7 @@ function! s:TempReadPost(file) abort
|
|||||||
if has_key(dict, 'filetype')
|
if has_key(dict, 'filetype')
|
||||||
let &l:filetype = dict.filetype
|
let &l:filetype = dict.filetype
|
||||||
endif
|
endif
|
||||||
setlocal foldmarker=<<<<<<<,>>>>>>>
|
setlocal foldmarker=<<<<<<<<,>>>>>>>>
|
||||||
if !&modifiable
|
if !&modifiable
|
||||||
if empty(mapcheck('q', 'n'))
|
if empty(mapcheck('q', 'n'))
|
||||||
nnoremap <buffer> <silent> q :<C-U>echoerr "fugitive: q is removed in favor of gq (or :q)"<CR>
|
nnoremap <buffer> <silent> q :<C-U>echoerr "fugitive: q is removed in favor of gq (or :q)"<CR>
|
||||||
@@ -3101,7 +3101,7 @@ function! s:StatusCommand(line1, line2, range, count, bang, mods, reg, arg, args
|
|||||||
try
|
try
|
||||||
let mods = s:Mods(a:mods, &splitbelow ? 'botright' : 'topleft')
|
let mods = s:Mods(a:mods, &splitbelow ? 'botright' : 'topleft')
|
||||||
let file = fugitive#Find(':', dir)
|
let file = fugitive#Find(':', dir)
|
||||||
let arg = ' +let\ w:fugitive_status=FugitiveGitDir() ' .
|
let arg = ' +setl\ foldmarker=<<<<<<<<,>>>>>>>>\|let\ w:fugitive_status=FugitiveGitDir() ' .
|
||||||
\ s:fnameescape(file)
|
\ s:fnameescape(file)
|
||||||
for tabnr in [tabpagenr()] + (mods =~# '\<tab\>' ? range(1, tabpagenr('$')) : [])
|
for tabnr in [tabpagenr()] + (mods =~# '\<tab\>' ? range(1, tabpagenr('$')) : [])
|
||||||
let bufs = tabpagebuflist(tabnr)
|
let bufs = tabpagebuflist(tabnr)
|
||||||
|
|||||||
Reference in New Issue
Block a user