Skip to content

Commit

Permalink
message Done $url should be displayed at the last of sequences. relat…
Browse files Browse the repository at this point in the history
…ed issue #188
  • Loading branch information
mattn committed Jun 7, 2015
1 parent 2359554 commit 1985efd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions autoload/gist.vim
Expand Up @@ -526,9 +526,9 @@ function! s:GistUpdate(content, gistid, gistnm, desc) abort
if res.status =~# '^2'
let obj = webapi#json#decode(res.content)
let loc = obj['html_url']
redraw | echomsg 'Done: '.loc
let b:gist = {"id": a:gistid, "filename": filename}
setlocal nomodified
redraw | echomsg 'Done: '.loc
else
let loc = ''
echohl ErrorMsg | echomsg 'Post failed: ' . res.message | echohl None
Expand All @@ -550,10 +550,10 @@ function! s:GistDelete(gistid) abort
\ "Content-Type": "application/json",
\}, 'DELETE')
if res.status =~# '^2'
redraw | echomsg 'Done: '
if exists('b:gist')
unlet b:gist
endif
redraw | echomsg 'Done: '
else
echohl ErrorMsg | echomsg 'Delete failed: ' . res.message | echohl None
endif
Expand Down Expand Up @@ -621,7 +621,6 @@ function! s:GistPost(content, private, desc, anonymous) abort
if res.status =~# '^2'
let obj = webapi#json#decode(res.content)
let loc = obj['html_url']
redraw | echomsg 'Done: '.loc
let b:gist = {
\ "filename": filename,
\ "id": matchstr(loc, '[^/]\+$'),
Expand All @@ -631,6 +630,7 @@ function! s:GistPost(content, private, desc, anonymous) abort
if s:update_GistID(b:gist['id'])
Gist -e
endif
redraw | echomsg 'Done: '.loc
else
let loc = ''
echohl ErrorMsg | echomsg 'Post failed: '. res.message | echohl None
Expand Down Expand Up @@ -677,7 +677,6 @@ function! s:GistPostBuffers(private, desc, anonymous) abort
if res.status =~# '^2'
let obj = webapi#json#decode(res.content)
let loc = obj['html_url']
redraw | echomsg 'Done: '.loc
let b:gist = {
\ "filename": filename,
\ "id": matchstr(loc, '[^/]\+$'),
Expand All @@ -687,6 +686,7 @@ function! s:GistPostBuffers(private, desc, anonymous) abort
if s:update_GistID(b:gist['id'])
Gist -e
endif
redraw | echomsg 'Done: '.loc
else
let loc = ''
echohl ErrorMsg | echomsg 'Post failed: ' . res.message | echohl None
Expand Down

0 comments on commit 1985efd

Please sign in to comment.