From 9931e0888b2419326ae10ebbfae532261c5c125f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 30 Jun 2016 16:11:56 +0200 Subject: Fix submodules --- vim/bundle/tlib_vim | 1 + vim/bundle/tlib_vim/autoload/tlib/progressbar.vim | 72 ----------------------- 2 files changed, 1 insertion(+), 72 deletions(-) create mode 160000 vim/bundle/tlib_vim delete mode 100755 vim/bundle/tlib_vim/autoload/tlib/progressbar.vim (limited to 'vim/bundle/tlib_vim/autoload/tlib/progressbar.vim') diff --git a/vim/bundle/tlib_vim b/vim/bundle/tlib_vim new file mode 160000 index 0000000..5636472 --- /dev/null +++ b/vim/bundle/tlib_vim @@ -0,0 +1 @@ +Subproject commit 5636472e5dba1a4104376ce6bd93cc2546e02483 diff --git a/vim/bundle/tlib_vim/autoload/tlib/progressbar.vim b/vim/bundle/tlib_vim/autoload/tlib/progressbar.vim deleted file mode 100755 index e739eb3..0000000 --- a/vim/bundle/tlib_vim/autoload/tlib/progressbar.vim +++ /dev/null @@ -1,72 +0,0 @@ -" @Author: Tom Link (mailto: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: 72 - -let s:statusline = [] -let s:laststatus = [] -let s:max = [] -let s:format = [] -let s:width = [] -let s:value = [] -let s:timestamp = -1 - -" EXAMPLE: > -" call tlib#progressbar#Init(20) -" try -" for i in range(20) -" call tlib#progressbar#Display(i) -" call DoSomethingThatTakesSomeTime(i) -" endfor -" finally -" call tlib#progressbar#Restore() -" endtry -function! tlib#progressbar#Init(max, ...) "{{{3 - TVarArg ['format', '%s'], ['width', 10] - call insert(s:statusline, &statusline) - call insert(s:laststatus, &laststatus) - call insert(s:max, a:max) - call insert(s:format, format) - call insert(s:width, width) - call insert(s:value, -1) - let &laststatus = 2 - let s:timestamp = localtime() -endf - - -function! tlib#progressbar#Display(value, ...) "{{{3 - TVarArg 'extra', ['always', 0] - let ts = localtime() - if !always && ts == s:timestamp - return - else - let s:timestamp = ts - endif - let val = a:value * s:width[0] / s:max[0] - if always || val != s:value[0] - let s:value[0] = val - let pbl = repeat('#', val) - let pbr = repeat('.', s:width[0] - val) - let txt = printf(s:format[0], '['.pbl.pbr.']') . extra - let &l:statusline = txt - " TLogDBG txt - redrawstatus - " redraw - " call tlib#notify#Echo(txt) - endif -endf - - -function! tlib#progressbar#Restore() "{{{3 - let &l:statusline = remove(s:statusline, 0) - let &laststatus = remove(s:laststatus, 0) - redrawstatus - " redraw - " echo - call remove(s:max, 0) - call remove(s:format, 0) - call remove(s:width, 0) - call remove(s:value, 0) -endf - - -- cgit v1.2.3