Really turn off modelines in commits and :Gstatus
Partially addresses #162.
This commit is contained in:
parent
5225697d9c
commit
f0cb627a8e
@ -1856,7 +1856,7 @@ function! s:BufReadIndex()
|
|||||||
let b:fugitive_type = 'index'
|
let b:fugitive_type = 'index'
|
||||||
try
|
try
|
||||||
let b:git_dir = s:repo().dir()
|
let b:git_dir = s:repo().dir()
|
||||||
setlocal noro ma
|
setlocal noro ma nomodeline
|
||||||
if fnamemodify($GIT_INDEX_FILE !=# '' ? $GIT_INDEX_FILE : b:git_dir . '/index', ':p') ==# expand('%:p')
|
if fnamemodify($GIT_INDEX_FILE !=# '' ? $GIT_INDEX_FILE : b:git_dir . '/index', ':p') ==# expand('%:p')
|
||||||
let index = ''
|
let index = ''
|
||||||
else
|
else
|
||||||
@ -1876,7 +1876,7 @@ function! s:BufReadIndex()
|
|||||||
endtry
|
endtry
|
||||||
set ft=gitcommit
|
set ft=gitcommit
|
||||||
endif
|
endif
|
||||||
setlocal ro noma nomod nomodeline noswapfile bufhidden=wipe
|
setlocal ro noma nomod noswapfile bufhidden=wipe
|
||||||
call s:JumpInit()
|
call s:JumpInit()
|
||||||
nunmap <buffer> P
|
nunmap <buffer> P
|
||||||
nunmap <buffer> ~
|
nunmap <buffer> ~
|
||||||
@ -1987,6 +1987,10 @@ function! s:BufReadObject()
|
|||||||
let b:fugitive_display_format = +getbufvar('#','fugitive_display_format')
|
let b:fugitive_display_format = +getbufvar('#','fugitive_display_format')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if b:fugitive_type !=# 'blob'
|
||||||
|
setlocal nomodeline
|
||||||
|
endif
|
||||||
|
|
||||||
let pos = getpos('.')
|
let pos = getpos('.')
|
||||||
silent %delete
|
silent %delete
|
||||||
setlocal endofline
|
setlocal endofline
|
||||||
@ -2026,7 +2030,7 @@ function! s:BufReadObject()
|
|||||||
call s:ReplaceCmd(s:repo().git_command('cat-file',b:fugitive_type,hash))
|
call s:ReplaceCmd(s:repo().git_command('cat-file',b:fugitive_type,hash))
|
||||||
endif
|
endif
|
||||||
call setpos('.',pos)
|
call setpos('.',pos)
|
||||||
setlocal ro noma nomod nomodeline
|
setlocal ro noma nomod
|
||||||
if &bufhidden ==# ''
|
if &bufhidden ==# ''
|
||||||
setlocal bufhidden=delete
|
setlocal bufhidden=delete
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user