Skip to content

Commit 1985efd

Browse files
committed
message Done $url should be displayed at the last of sequences. related issue #188
1 parent 2359554 commit 1985efd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

autoload/gist.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -526,9 +526,9 @@ function! s:GistUpdate(content, gistid, gistnm, desc) abort
526526
if res.status =~# '^2'
527527
let obj = webapi#json#decode(res.content)
528528
let loc = obj['html_url']
529-
redraw | echomsg 'Done: '.loc
530529
let b:gist = {"id": a:gistid, "filename": filename}
531530
setlocal nomodified
531+
redraw | echomsg 'Done: '.loc
532532
else
533533
let loc = ''
534534
echohl ErrorMsg | echomsg 'Post failed: ' . res.message | echohl None
@@ -550,10 +550,10 @@ function! s:GistDelete(gistid) abort
550550
\ "Content-Type": "application/json",
551551
\}, 'DELETE')
552552
if res.status =~# '^2'
553-
redraw | echomsg 'Done: '
554553
if exists('b:gist')
555554
unlet b:gist
556555
endif
556+
redraw | echomsg 'Done: '
557557
else
558558
echohl ErrorMsg | echomsg 'Delete failed: ' . res.message | echohl None
559559
endif
@@ -621,7 +621,6 @@ function! s:GistPost(content, private, desc, anonymous) abort
621621
if res.status =~# '^2'
622622
let obj = webapi#json#decode(res.content)
623623
let loc = obj['html_url']
624-
redraw | echomsg 'Done: '.loc
625624
let b:gist = {
626625
\ "filename": filename,
627626
\ "id": matchstr(loc, '[^/]\+$'),
@@ -631,6 +630,7 @@ function! s:GistPost(content, private, desc, anonymous) abort
631630
if s:update_GistID(b:gist['id'])
632631
Gist -e
633632
endif
633+
redraw | echomsg 'Done: '.loc
634634
else
635635
let loc = ''
636636
echohl ErrorMsg | echomsg 'Post failed: '. res.message | echohl None
@@ -677,7 +677,6 @@ function! s:GistPostBuffers(private, desc, anonymous) abort
677677
if res.status =~# '^2'
678678
let obj = webapi#json#decode(res.content)
679679
let loc = obj['html_url']
680-
redraw | echomsg 'Done: '.loc
681680
let b:gist = {
682681
\ "filename": filename,
683682
\ "id": matchstr(loc, '[^/]\+$'),
@@ -687,6 +686,7 @@ function! s:GistPostBuffers(private, desc, anonymous) abort
687686
if s:update_GistID(b:gist['id'])
688687
Gist -e
689688
endif
689+
redraw | echomsg 'Done: '.loc
690690
else
691691
let loc = ''
692692
echohl ErrorMsg | echomsg 'Post failed: ' . res.message | echohl None

0 commit comments

Comments
 (0)