mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-12-07 20:54:33 +08:00
Use :setlocal for all local options
This commit is contained in:
@@ -1541,7 +1541,7 @@ function! fugitive#BufReadStatus() abort
|
|||||||
call s:AddSection('Unpushed to ' . push, unpushed)
|
call s:AddSection('Unpushed to ' . push, unpushed)
|
||||||
call s:AddSection('Unpulled from ' . pull, unpulled)
|
call s:AddSection('Unpulled from ' . pull, unpulled)
|
||||||
|
|
||||||
set nomodified readonly noswapfile
|
setlocal nomodified readonly noswapfile
|
||||||
silent doautocmd BufReadPost
|
silent doautocmd BufReadPost
|
||||||
setlocal nomodifiable
|
setlocal nomodifiable
|
||||||
if &bufhidden ==# ''
|
if &bufhidden ==# ''
|
||||||
@@ -1589,7 +1589,7 @@ function! fugitive#BufReadStatus() abort
|
|||||||
nnoremap <buffer> . :<C-U> <C-R>=<SID>StageArgs(0)<CR><Home>
|
nnoremap <buffer> . :<C-U> <C-R>=<SID>StageArgs(0)<CR><Home>
|
||||||
xnoremap <buffer> . :<C-U> <C-R>=<SID>StageArgs(1)<CR><Home>
|
xnoremap <buffer> . :<C-U> <C-R>=<SID>StageArgs(1)<CR><Home>
|
||||||
nnoremap <buffer> <silent> <F1> :help fugitive-mappings<CR>
|
nnoremap <buffer> <silent> <F1> :help fugitive-mappings<CR>
|
||||||
set filetype=fugitive
|
setlocal filetype=fugitive
|
||||||
|
|
||||||
for [lnum, section] in [[staged_end, 'Staged'], [unstaged_end, 'Unstaged']]
|
for [lnum, section] in [[staged_end, 'Staged'], [unstaged_end, 'Unstaged']]
|
||||||
while len(getline(lnum))
|
while len(getline(lnum))
|
||||||
@@ -3317,7 +3317,7 @@ function! s:Write(force,...) abort
|
|||||||
return 'echoerr v:errmsg'
|
return 'echoerr v:errmsg'
|
||||||
endif
|
endif
|
||||||
if s:cpath(fugitive#Real(@%), file) && s:DirCommitFile(@%)[1] =~# '^\d$'
|
if s:cpath(fugitive#Real(@%), file) && s:DirCommitFile(@%)[1] =~# '^\d$'
|
||||||
set nomodified
|
setlocal nomodified
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let one = s:Generate(':1:'.file)
|
let one = s:Generate(':1:'.file)
|
||||||
@@ -3349,7 +3349,7 @@ function! s:Write(force,...) abort
|
|||||||
silent execute '$read '.s:fnameescape(file)
|
silent execute '$read '.s:fnameescape(file)
|
||||||
silent execute '1,'.last.'delete_'
|
silent execute '1,'.last.'delete_'
|
||||||
silent execute lnum
|
silent execute lnum
|
||||||
set nomodified
|
setlocal nomodified
|
||||||
diffupdate
|
diffupdate
|
||||||
finally
|
finally
|
||||||
if exists('restorewinnr')
|
if exists('restorewinnr')
|
||||||
|
|||||||
Reference in New Issue
Block a user