Skip to content

Instantly share code, notes, and snippets.

@mattn
Created March 18, 2014 07:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattn/9615078 to your computer and use it in GitHub Desktop.
Save mattn/9615078 to your computer and use it in GitHub Desktop.
Index: twitvim.vim
===================================================================
--- twitvim.vim (revision 349)
+++ twitvim.vim (working copy)
@@ -2332,6 +2332,12 @@
redraw
let mesg = input("Tweet: ", a:initstr)
call inputrestore()
+
+ if mesg == ""
+ call s:warnmsg("Your message was empty. It was not sent.")
+ return
+ endif
+
call s:post_twitter(mesg, a:inreplyto)
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment