From 3a052e477718174733bfa6411b7920bfc5beb175 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Mon, 12 Feb 2018 15:52:34 +0000 Subject: [PATCH] More idiomatic execute. --- autoload/gitgutter/diff.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/gitgutter/diff.vim b/autoload/gitgutter/diff.vim index 55fbbcc..1b2186f 100644 --- a/autoload/gitgutter/diff.vim +++ b/autoload/gitgutter/diff.vim @@ -293,7 +293,7 @@ function! s:write_buffer(bufnr, file) " There doesn't seem to be a clean way to write a buffer that isn't the current " to a file; we have to switch to it, write it, then switch back. let current_buffer = bufnr('') - execute 'buffer '.a:bufnr + execute 'buffer' a:bufnr " Writing the whole buffer resets the '[ and '] marks and also the " 'modified' flag (if &cpoptions includes '+'). These are unwanted @@ -308,7 +308,7 @@ function! s:write_buffer(bufnr, file) call setpos("'[", op_mark_start) call setpos("']", op_mark_end) - execute 'buffer '.current_buffer + execute 'buffer' current_buffer endfunction