Skip to content

Commit ea2f19f

Browse files
mattnallex
authored andcommitted
fix autocmd to write command. close #193
1 parent 9955879 commit ea2f19f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

autoload/gist.vim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"=============================================================================
22
" File: gist.vim
33
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
4-
" Last Change: 03-May-2015.
4+
" Last Change: 04-Jul-2015.
55
" Version: 7.2
66
" WebPage: http://github.com/mattn/gist-vim
77
" License: BSD
@@ -362,6 +362,9 @@ function! s:GistGet(gistid, clipboard) abort
362362
echohl ErrorMsg | echomsg 'Gist not found' | echohl None
363363
return
364364
endif
365+
augroup GistWrite
366+
au!
367+
augroup END
365368
for n in range(num_file)
366369
try
367370
let old_undolevels = &undolevels
@@ -450,7 +453,6 @@ function! s:GistGet(gistid, clipboard) abort
450453
endif
451454
1
452455
augroup GistWrite
453-
au!
454456
au! BufWriteCmd <buffer> call s:GistWrite(expand("<amatch>"))
455457
augroup END
456458
endfor

0 commit comments

Comments
 (0)