From 57b4d848a42c6ed4c8f5db44d6abf543253d4fdc Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 28 Feb 2019 20:08:09 -0500 Subject: [PATCH] Use :setlocal for all local options --- autoload/fugitive.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 9bd209c..4a57ced 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -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 ==# '' @@ -1589,7 +1589,7 @@ function! fugitive#BufReadStatus() abort nnoremap . : =StageArgs(0) xnoremap . : =StageArgs(1) nnoremap :help fugitive-mappings - set filetype=fugitive + setlocal filetype=fugitive for [lnum, section] in [[staged_end, 'Staged'], [unstaged_end, 'Unstaged']] while len(getline(lnum)) @@ -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) @@ -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')