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/notify.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/notify.vim')
m--------- | vim/bundle/tlib_vim | 0 | ||||
-rwxr-xr-x | vim/bundle/tlib_vim/autoload/tlib/notify.vim | 113 |
2 files changed, 0 insertions, 113 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/notify.vim b/vim/bundle/tlib_vim/autoload/tlib/notify.vim deleted file mode 100755 index 541dbd0..0000000 --- a/vim/bundle/tlib_vim/autoload/tlib/notify.vim +++ /dev/null @@ -1,113 +0,0 @@ -" notify.vim -" @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) -" @Created: 2008-09-19. -" @Last Change: 2016-06-28. -" @Revision: 2.3.19 - -let s:save_cpo = &cpo -set cpo&vim - - -" :display: tlib#notify#Echo(text, ?style='') -" Print text in the echo area. Temporarily disable 'ruler' and 'showcmd' -" in order to prevent |press-enter| messages. -function! tlib#notify#Echo(text, ...) - TVarArg 'style' - let ruler = &ruler - let showcmd = &showcmd - let text = substitute(a:text, '\n', '|', 'g') - try - set noruler - set noshowcmd - if !empty(style) - exec 'echohl' style - endif - echo strpart(text, 0, &columns - 1) - finally - if !empty(style) - echohl None - endif - let &ruler = ruler - let &showcmd = showcmd - endtry -endf - - -" Contributed by Erik Falor: -" If the line containing the message is too long, echoing it will cause -" a 'Hit ENTER' prompt to appear. This function cleans up the line so -" that does not happen. -" The echoed line is too long if it is wider than the width of the -" window, minus cmdline space taken up by the ruler and showcmd -" features. -function! tlib#notify#TrimMessage(message) "{{{3 - let filler = '...' - - " If length of message with tabs converted into spaces + length of - " line number + 2 (for the ': ' that follows the line number) is - " greater than the width of the screen, truncate in the middle - let to_fill = &columns - " TLogVAR to_fill - - " Account for space used by elements in the command-line to avoid - " 'Hit ENTER' prompts. - " If showcmd is on, it will take up 12 columns. - " If the ruler is enabled, but not displayed in the statusline, it - " will in its default form take 17 columns. If the user defines a - " custom &rulerformat, they will need to specify how wide it is. - if has('cmdline_info') - if &showcmd - let to_fill -= 12 - else - let to_fill -= 1 - endif - " TLogVAR &showcmd, to_fill - - " TLogVAR &laststatus, &ruler, &rulerformat - if &ruler - if &laststatus == 0 || winnr('$') == 1 - if has('statusline') - if &rulerformat == '' - " default ruler is 17 chars wide - let to_fill -= 17 - elseif exists('g:MP_rulerwidth') - let to_fill -= g:MP_rulerwidth - else - " tml: fallback: guess length - let to_fill -= strlen(&rulerformat) - endif - else - endif - endif - else - endif - else - let to_fill -= 1 - endif - - " TLogVAR to_fill - " TLogDBG strlen(a:message) - if strlen(a:message) > to_fill - let front = to_fill / 2 - 1 - let back = front - if to_fill % 2 == 0 | let back -= 1 | endif - return strpart(a:message, 0, front) . filler . - \strpart(a:message, strlen(a:message) - back) - else - return a:message - endif -endfunction - - -function! tlib#notify#PrintError() abort "{{{3 - echohl ErrorMsg - echom v:exception - echom v:throwpoint - echohl NONE -endf - - -let &cpo = s:save_cpo -unlet s:save_cpo |