diff options
author | Karel Kočí <cynerd@email.cz> | 2016-06-30 16:11:56 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2016-06-30 16:11:56 +0200 |
commit | 9931e0888b2419326ae10ebbfae532261c5c125f (patch) | |
tree | 7504be5daccbb7b7d1ea396754de47b11ed790e5 /vim/bundle/tlib_vim/autoload/tlib/char.vim | |
parent | e573b3020c032400eed60b649a2cbf55266e6bb0 (diff) | |
download | myconfigs-9931e0888b2419326ae10ebbfae532261c5c125f.tar.gz myconfigs-9931e0888b2419326ae10ebbfae532261c5c125f.tar.bz2 myconfigs-9931e0888b2419326ae10ebbfae532261c5c125f.zip |
Fix submodules
Diffstat (limited to 'vim/bundle/tlib_vim/autoload/tlib/char.vim')
m--------- | vim/bundle/tlib_vim | 0 | ||||
-rwxr-xr-x | vim/bundle/tlib_vim/autoload/tlib/char.vim | 59 |
2 files changed, 0 insertions, 59 deletions
diff --git a/vim/bundle/tlib_vim b/vim/bundle/tlib_vim new file mode 160000 +Subproject 5636472e5dba1a4104376ce6bd93cc2546e0248 diff --git a/vim/bundle/tlib_vim/autoload/tlib/char.vim b/vim/bundle/tlib_vim/autoload/tlib/char.vim deleted file mode 100755 index d3d2cb6..0000000 --- a/vim/bundle/tlib_vim/autoload/tlib/char.vim +++ /dev/null @@ -1,59 +0,0 @@ -" @Author: Tom Link (micathom AT gmail com?subject=[vim]) -" @Website: http://www.vim.org/account/profile.php?user_id=4037 -" @License: GPL (see http://www.gnu.org/licenses/gpl.txt) -" @Revision: 38 - - -" :def: function! tlib#char#Get(?timeout=0) -" Get a character. -" -" EXAMPLES: > -" echo tlib#char#Get() -" echo tlib#char#Get(5) -function! tlib#char#Get(...) "{{{3 - TVarArg ['timeout', 0], ['resolution', 0], ['getmod', 0] - let char = -1 - let mode = 0 - if timeout == 0 || !has('reltime') - let char = getchar() - else - let char = tlib#char#GetWithTimeout(timeout, resolution) - endif - if getmod - if char != -1 - let mode = getcharmod() - endif - return [char, mode] - else - return char - endif -endf - - -function! tlib#char#IsAvailable() "{{{3 - let ch = getchar(1) - return type(ch) == 0 && ch != 0 -endf - - -function! tlib#char#GetWithTimeout(timeout, ...) "{{{3 - TVarArg ['resolution', 2] - " TLogVAR a:timeout, resolution - let start = tlib#time#MSecs() - while 1 - let c = getchar(0) - if type(c) != 0 || c != 0 - return c - else - let now = tlib#time#MSecs() - let diff = tlib#time#DiffMSecs(now, start, resolution) - " TLogVAR diff - if diff > a:timeout - return -1 - endif - endif - endwh - return -1 -endf - - |