Skip to content

Commit

Permalink
Use :setlocal for all local options
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Mar 1, 2019
1 parent 9472390 commit 57b4d84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions autoload/fugitive.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,7 @@ function! fugitive#BufReadStatus() abort
call s:AddSection('Unpushed to ' . push, unpushed)
call s:AddSection('Unpulled from ' . pull, unpulled)

set nomodified readonly noswapfile
setlocal nomodified readonly noswapfile
silent doautocmd BufReadPost
setlocal nomodifiable
if &bufhidden ==# ''
Expand Down Expand Up @@ -1589,7 +1589,7 @@ function! fugitive#BufReadStatus() abort
nnoremap <buffer> . :<C-U> <C-R>=<SID>StageArgs(0)<CR><Home>
xnoremap <buffer> . :<C-U> <C-R>=<SID>StageArgs(1)<CR><Home>
nnoremap <buffer> <silent> <F1> :help fugitive-mappings<CR>
set filetype=fugitive
setlocal filetype=fugitive

for [lnum, section] in [[staged_end, 'Staged'], [unstaged_end, 'Unstaged']]
while len(getline(lnum))
Expand Down Expand Up @@ -3317,7 +3317,7 @@ function! s:Write(force,...) abort
return 'echoerr v:errmsg'
endif
if s:cpath(fugitive#Real(@%), file) && s:DirCommitFile(@%)[1] =~# '^\d$'
set nomodified
setlocal nomodified
endif

let one = s:Generate(':1:'.file)
Expand Down Expand Up @@ -3349,7 +3349,7 @@ function! s:Write(force,...) abort
silent execute '$read '.s:fnameescape(file)
silent execute '1,'.last.'delete_'
silent execute lnum
set nomodified
setlocal nomodified
diffupdate
finally
if exists('restorewinnr')
Expand Down

0 comments on commit 57b4d84

Please sign in to comment.